{{{
from django.test import TestCase
class TestSubTest(TestCase):
def test(self):
with self.subTest():
self.assertTrue(False)
}}}
{{{
python tests/runtests.py --debug-sql test_subtest
1 ↵
Testing against Django installed in '/home/sergey/dev/django/django' with
up to 4 processes
Creating test database for alias 'default'...
Creating test database for alias 'other'...
System check identified no issues (0 silenced).
Traceback (most recent call last):
File "tests/runtests.py", line 478, in <module>
options.exclude_tags,
File "tests/runtests.py", line 286, in django_tests
extra_tests=extra_tests,
File "/home/sergey/dev/django/django/test/runner.py", line 604, in
run_tests
result = self.run_suite(suite)
File "/home/sergey/dev/django/django/test/runner.py", line 570, in
run_suite
return runner.run(suite)
File "/usr/lib/python3.5/unittest/runner.py", line 183, in run
result.printErrors()
File "/usr/lib/python3.5/unittest/runner.py", line 110, in printErrors
self.printErrorList('FAIL', self.failures)
File "/home/sergey/dev/django/django/test/runner.py", line 60, in
printErrorList
for test, err, sql_debug in errors:
ValueError: not enough values to unpack (expected 3, got 2)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28360>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* owner: nobody => Sergey Fedoseev
--
Ticket URL: <https://code.djangoproject.com/ticket/28360#comment:1>
* component: Uncategorized => Testing framework
--
Ticket URL: <https://code.djangoproject.com/ticket/28360#comment:2>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/8703 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/28360#comment:3>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/28360#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"6de2930078d5d13894315c0a88549e6a5e71c701" 6de2930]:
{{{
#!CommitTicketReference repository=""
revision="6de2930078d5d13894315c0a88549e6a5e71c701"
Fixed #28360 -- Fixed test runner crash with --debug-sql on fail/error in
subTest.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28360#comment:5>