summaryrefslogtreecommitdiff
path: root/django/test/runner.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2021-01-19 08:35:16 +0100
committerCarlton Gibson <carlton@noumenal.es>2021-02-10 10:20:54 +0100
commitec0ff406311de88f4e2a135d784363424fe602aa (patch)
treec1659b85ea145704a1b733d40a6a9a45e9332d0f /django/test/runner.py
parent9c6ba876928fd20194ac3238dc06aeae66d7bd50 (diff)
Fixed #32355 -- Dropped support for Python 3.6 and 3.7
Diffstat (limited to 'django/test/runner.py')
-rw-r--r--django/test/runner.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/django/test/runner.py b/django/test/runner.py
index 8e6c29b0b4..e14c6381eb 100644
--- a/django/test/runner.py
+++ b/django/test/runner.py
@@ -21,7 +21,6 @@ from django.test.utils import (
teardown_test_environment,
)
from django.utils.datastructures import OrderedSet
-from django.utils.version import PY37
try:
import ipdb as pdb
@@ -240,8 +239,8 @@ failure and get a correct traceback.
self.stop_if_failfast()
def addSubTest(self, test, subtest, err):
- # Follow Python 3.5's implementation of unittest.TestResult.addSubTest()
- # by not doing anything when a subtest is successful.
+ # Follow Python's implementation of unittest.TestResult.addSubTest() by
+ # not doing anything when a subtest is successful.
if err is not None:
# Call check_picklable() before check_subtest_picklable() since
# check_picklable() performs the tblib check.
@@ -540,15 +539,14 @@ class DiscoverRunner:
'Output timings, including database set up and total run time.'
),
)
- if PY37:
- parser.add_argument(
- '-k', action='append', dest='test_name_patterns',
- help=(
- 'Only run test methods and classes that match the pattern '
- 'or substring. Can be used multiple times. Same as '
- 'unittest -k option.'
- ),
- )
+ parser.add_argument(
+ '-k', action='append', dest='test_name_patterns',
+ help=(
+ 'Only run test methods and classes that match the pattern '
+ 'or substring. Can be used multiple times. Same as '
+ 'unittest -k option.'
+ ),
+ )
def setup_test_environment(self, **kwargs):
setup_test_environment(debug=self.debug_mode)