diff options
| author | Daniel Garcia Moreno <daniel.garcia@suse.com> | 2024-02-09 11:49:08 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2024-02-10 16:14:51 +0100 |
| commit | bc8471f0aac8f0c215b9471b594d159783bac19b (patch) | |
| tree | 2b2c98f2221b643a2f7c4da206b566ec7b5aeb7c /tests/test_utils | |
| parent | b47bdb4cd9149ee2a39bf1cc9996a36a940bd7d9 (diff) | |
Refs #34900, Refs #34118 -- Updated assertion in test_skip_class_unless_db_feature() test on Python 3.12.2+.
Python 3.12.2 bring back the skipped tests in the number of running
tests. Refs
https://github.com/python/cpython/commit/0a737639dcd3b7181250f5d56694b192eaddeef0
Diffstat (limited to 'tests/test_utils')
| -rw-r--r-- | tests/test_utils/tests.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py index e001e119ee..23e430cdc6 100644 --- a/tests/test_utils/tests.py +++ b/tests/test_utils/tests.py @@ -184,9 +184,11 @@ class SkippingClassTestCase(TransactionTestCase): except unittest.SkipTest: self.fail("SkipTest should not be raised here.") result = unittest.TextTestRunner(stream=StringIO()).run(test_suite) - # PY312: Python 3.12.1+ no longer includes skipped tests in the number - # of running tests. - self.assertEqual(result.testsRun, 1 if sys.version_info >= (3, 12, 1) else 3) + # PY312: Python 3.12.1 does not include skipped tests in the number of + # running tests. + self.assertEqual( + result.testsRun, 1 if sys.version_info[:3] == (3, 12, 1) else 3 + ) self.assertEqual(len(result.skipped), 2) self.assertEqual(result.skipped[0][1], "Database has feature(s) __class__") self.assertEqual(result.skipped[1][1], "Database has feature(s) __class__") |
