#28360: DebugSQLTextTestResult.printErrorList crashes on subTest failure
-------------------------------------------+------------------------
               Reporter:  Sergey Fedoseev  |          Owner:  nobody
                   Type:  Bug              |         Status:  new
              Component:  Uncategorized    |        Version:  1.11
               Severity:  Normal           |       Keywords:
           Triage Stage:  Unreviewed       |      Has patch:  0
    Needs documentation:  0                |    Needs tests:  0
Patch needs improvement:  0                |  Easy pickings:  0
                  UI/UX:  0                |
-------------------------------------------+------------------------
 tests/test_subtest.py:

 {{{
 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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.ad31c4a2d12ec63b14f2a2604b727fe2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to