diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-01-17 22:09:56 +0100 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-01-20 14:07:28 +0100 |
| commit | f5772de69679efb54129ac1cbca3579b512778af (patch) | |
| tree | ab215760e2e77124bbb8970b0913c2a99ae68743 /tests/test_runner/test_parallel.py | |
| parent | 61dae11df52fae71fc3050974ac459f362c9dfd7 (diff) | |
Fixed #36005 -- Dropped support for Python 3.10 and 3.11.
Diffstat (limited to 'tests/test_runner/test_parallel.py')
| -rw-r--r-- | tests/test_runner/test_parallel.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/test_runner/test_parallel.py b/tests/test_runner/test_parallel.py index 5026bc36c5..3af0fbf2f9 100644 --- a/tests/test_runner/test_parallel.py +++ b/tests/test_runner/test_parallel.py @@ -7,7 +7,6 @@ from unittest.suite import TestSuite, _ErrorHolder from django.test import SimpleTestCase from django.test.runner import ParallelTestSuite, RemoteTestResult -from django.utils.version import PY311, PY312 try: import tblib.pickling_support @@ -193,27 +192,21 @@ class RemoteTestResultTest(SimpleTestCase): subtest_test.run(result=result) events = result.events - # addDurations added in Python 3.12. - if PY312: - self.assertEqual(len(events), 5) - else: - self.assertEqual(len(events), 4) + self.assertEqual(len(events), 5) self.assertIs(result.wasSuccessful(), False) event = events[1] self.assertEqual(event[0], "addSubTest") self.assertEqual( str(event[2]), - "dummy_test (test_runner.test_parallel.SampleFailingSubtest%s) (index=0)" - # Python 3.11 uses fully qualified test name in the output. - % (".dummy_test" if PY311 else ""), + "dummy_test (test_runner.test_parallel.SampleFailingSubtest.dummy_test) " + "(index=0)", ) self.assertEqual(repr(event[3][1]), "AssertionError('0 != 1')") event = events[2] self.assertEqual(repr(event[3][1]), "AssertionError('2 != 1')") - @unittest.skipUnless(PY312, "unittest --durations option requires Python 3.12") def test_add_duration(self): result = RemoteTestResult() result.addDuration(None, 2.3) |
