summaryrefslogtreecommitdiff
path: root/tests/test_runner/test_debug_sql.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-01-23 08:23:44 -0500
committerTim Graham <timograham@gmail.com>2015-01-23 16:23:32 -0500
commit0386b97706052b88cd6fbbf777698810981cfeb6 (patch)
tree1a420dd3175552d71188890a084285f96ff0b51f /tests/test_runner/test_debug_sql.py
parent1e219ac62f3313f5a5f8eb188240a11bedd41aa1 (diff)
Fixed test_runner test failure on Python 3.5; refs #23763.
Python change is http://bugs.python.org/issue22032
Diffstat (limited to 'tests/test_runner/test_debug_sql.py')
-rw-r--r--tests/test_runner/test_debug_sql.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/test_runner/test_debug_sql.py b/tests/test_runner/test_debug_sql.py
index 7bc0950d84..cc583cbb37 100644
--- a/tests/test_runner/test_debug_sql.py
+++ b/tests/test_runner/test_debug_sql.py
@@ -1,3 +1,4 @@
+import sys
import unittest
from django.db import connection
@@ -82,9 +83,12 @@ class TestDebugSQL(unittest.TestCase):
]
verbose_expected_outputs = [
- 'runTest (test_runner.test_debug_sql.FailingTest) ... FAIL',
- 'runTest (test_runner.test_debug_sql.ErrorTest) ... ERROR',
- 'runTest (test_runner.test_debug_sql.PassingTest) ... ok',
+ # Output format changed in Python 3.5+
+ x.format('' if sys.version_info < (3, 5) else 'TestDebugSQL.') for x in [
+ 'runTest (test_runner.test_debug_sql.{}FailingTest) ... FAIL',
+ 'runTest (test_runner.test_debug_sql.{}ErrorTest) ... ERROR',
+ 'runTest (test_runner.test_debug_sql.{}PassingTest) ... ok',
+ ]
]
if six.PY3:
verbose_expected_outputs += [