15
0
forked from pool/python-calmjs

- Rejig patch support-python-313.patch to also cope with other argparse

changes.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-calmjs?expand=0&rev=22
This commit is contained in:
2025-01-07 03:39:26 +00:00
committed by Git OBS Bridge
parent a6164d1db0
commit a588b26265
3 changed files with 19 additions and 1 deletions

View File

@@ -40,3 +40,15 @@ Index: calmjs-3.4.4/src/calmjs/tests/test_argparse.py
class ArgumentParserTestCase(unittest.TestCase):
@@ -306,7 +315,10 @@ class StoreCommaDelimitedListTestCase(un
with self.assertRaises(SystemExit):
argparser.parse_known_args(['-p', '3,2,1,0'])
- self.assertIn("(choose from '1', '2', '3')", sys.stderr.getvalue())
+ msg = "(choose from '1', '2', '3')"
+ if sys.version_info[:2] == (3, 12):
+ msg = "(choose from 1, 2, 3)"
+ self.assertIn(msg, sys.stderr.getvalue())
with self.assertRaises(SystemExit):
argparser.parse_known_args(['-p', '0'])