mirror of
https://github.com/django/django.git
synced 2024-11-29 14:46:18 +01:00
Refs #28814 -- Fixed test_runner failure on Python 3.7.
Due to https://bugs.python.org/issue30399.
This commit is contained in:
parent
931c60c521
commit
9d1d3b2d2f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user