Kaydet (Commit) 9d1d3b2d authored tarafından Tim Graham's avatar Tim Graham

Refs #28814 -- Fixed test_runner failure on Python 3.7.

Due to https://bugs.python.org/issue30399.
üst 931c60c5
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment