diff options
author | Tim Graham <timograham@gmail.com> | 2017-11-17 16:12:48 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2018-11-17 14:46:04 -0500 |
commit | b9e248975f3190fee245b30313c2744bf836bb1c (patch) | |
tree | d83ede1cc3d41c03df25b8187f15d7dcea93899a /tests | |
parent | 568c2f45ef531257a600c0e6ff8fe02525d7ab4e (diff) | |
download | django-b9e248975f3190fee245b30313c2744bf836bb1c.tar.gz |
[1.11.x] Refs #28814 -- Fixed test_runner failure on Python 3.7.
Due to https://bugs.python.org/issue30399.
Backport of 9d1d3b2d2fe0bef995b024368088eeabbdf73629 from master
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_runner/test_parallel.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_runner/test_parallel.py b/tests/test_runner/test_parallel.py index b888dc62af..7dca22e43e 100644 --- a/tests/test_runner/test_parallel.py +++ b/tests/test_runner/test_parallel.py @@ -1,3 +1,4 @@ +import sys import unittest from django.test import SimpleTestCase @@ -83,7 +84,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 sys.version_info >= (3, 7) 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) |