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

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jan 7 03:37:22 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Rejig patch support-python-313.patch to also cope with other argparse
changes.
-------------------------------------------------------------------
Mon Dec 9 03:34:48 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-calmjs
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed

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'])