summaryrefslogtreecommitdiff
path: root/tests/test_runner/test_parallel.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-11-17 16:12:48 -0500
committerTim Graham <timograham@gmail.com>2017-11-17 16:13:23 -0500
commit9d1d3b2d2fe0bef995b024368088eeabbdf73629 (patch)
tree8f690ee107d326e93869e54050755db82e2c803c /tests/test_runner/test_parallel.py
parent931c60c5216bd71bc11f489e00e063331cf21f40 (diff)
Refs #28814 -- Fixed test_runner failure on Python 3.7.
Due to https://bugs.python.org/issue30399.
Diffstat (limited to 'tests/test_runner/test_parallel.py')
-rw-r--r--tests/test_runner/test_parallel.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_runner/test_parallel.py b/tests/test_runner/test_parallel.py
index 0b575a606a..c1a89bd0f0 100644
--- a/tests/test_runner/test_parallel.py
+++ b/tests/test_runner/test_parallel.py
@@ -2,6 +2,7 @@ import unittest
from django.test import SimpleTestCase
from django.test.runner import RemoteTestResult
+from django.utils.version import PY37
try:
import tblib
@@ -79,7 +80,8 @@ class RemoteTestResultTest(SimpleTestCase):
event = events[1]
self.assertEqual(event[0], 'addSubTest')
self.assertEqual(str(event[2]), 'dummy_test (test_runner.test_parallel.SampleFailingSubtest) (index=0)')
- self.assertEqual(repr(event[3][1]), "AssertionError('0 != 1',)")
+ trailing_comma = '' if PY37 else ','
+ self.assertEqual(repr(event[3][1]), "AssertionError('0 != 1'%s)" % trailing_comma)
event = events[2]
- self.assertEqual(repr(event[3][1]), "AssertionError('2 != 1',)")
+ self.assertEqual(repr(event[3][1]), "AssertionError('2 != 1'%s)" % trailing_comma)