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/tests.py | |
| parent | 61dae11df52fae71fc3050974ac459f362c9dfd7 (diff) | |
Fixed #36005 -- Dropped support for Python 3.10 and 3.11.
Diffstat (limited to 'tests/test_runner/tests.py')
| -rw-r--r-- | tests/test_runner/tests.py | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/tests/test_runner/tests.py b/tests/test_runner/tests.py index fba8dd3b6f..d66ece4005 100644 --- a/tests/test_runner/tests.py +++ b/tests/test_runner/tests.py @@ -15,7 +15,7 @@ from django import db from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management import call_command -from django.core.management.base import CommandError, SystemCheckError +from django.core.management.base import SystemCheckError from django.test import SimpleTestCase, TransactionTestCase, skipUnlessDBFeature from django.test.runner import ( DiscoverRunner, @@ -32,7 +32,6 @@ from django.test.utils import ( get_unique_databases_and_mirrors, iter_test_cases, ) -from django.utils.version import PY312 from .models import B, Person, Through @@ -479,7 +478,6 @@ class ManageCommandTests(unittest.TestCase): ) self.assertIn("Total run took", stderr.getvalue()) - @unittest.skipUnless(PY312, "unittest --durations option requires Python 3.12") def test_durations(self): with captured_stderr() as stderr: call_command( @@ -490,17 +488,6 @@ class ManageCommandTests(unittest.TestCase): ) self.assertIn("durations=10", stderr.getvalue()) - @unittest.skipIf(PY312, "unittest --durations option requires Python 3.12") - def test_durations_lt_py312(self): - msg = "Error: unrecognized arguments: --durations=10" - with self.assertRaises(CommandError, msg=msg): - call_command( - "test", - "--durations=10", - "sites", - testrunner="test_runner.tests.MockTestRunner", - ) - # Isolate from the real environment. @mock.patch.dict(os.environ, {}, clear=True) |
