mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Refs #23919 -- Removed six.PY2/PY3 usage
Thanks Tim Graham for the review.
This commit is contained in:
parent
e63d98b7be
commit
c716fe8782
111 changed files with 305 additions and 1296 deletions
|
@ -2,7 +2,6 @@ import unittest
|
|||
|
||||
from django.test import SimpleTestCase
|
||||
from django.test.runner import RemoteTestResult
|
||||
from django.utils import six
|
||||
|
||||
try:
|
||||
import tblib
|
||||
|
@ -28,7 +27,6 @@ class ParallelTestRunnerTest(SimpleTestCase):
|
|||
parallel.
|
||||
"""
|
||||
|
||||
@unittest.skipUnless(six.PY3, 'subtests were added in Python 3.4')
|
||||
def test_subtest(self):
|
||||
"""
|
||||
Passing subtests work.
|
||||
|
@ -61,12 +59,10 @@ class RemoteTestResultTest(SimpleTestCase):
|
|||
result._confirm_picklable(picklable_error)
|
||||
|
||||
msg = '__init__() missing 1 required positional argument'
|
||||
if six.PY2:
|
||||
msg = '__init__() takes exactly 2 arguments (1 given)'
|
||||
with self.assertRaisesMessage(TypeError, msg):
|
||||
result._confirm_picklable(not_unpicklable_error)
|
||||
|
||||
@unittest.skipUnless(six.PY3 and tblib is not None, 'requires tblib to be installed')
|
||||
@unittest.skipUnless(tblib is not None, 'requires tblib to be installed')
|
||||
def test_add_failing_subtests(self):
|
||||
"""
|
||||
Failing subtests are added correctly using addSubTest().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue