mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #36005 -- Dropped support for Python 3.10 and 3.11.
This commit is contained in:
committed by
Sarah Boyce
parent
61dae11df5
commit
f5772de696
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user