You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and run with either python -munittest or stestr run gives an example output:
F
======================================================================
FAIL: test_failure (test_subtests.Base) [failure1]
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jake/code/qiskit/terra/test_subtests.py", line 14, in test_failure
self.assertTrue(False)
AssertionError: False is not true
======================================================================
FAIL: test_failure (test_subtests.Base) [failure2]
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jake/code/qiskit/terra/test_subtests.py", line 16, in test_failure
self.assertTrue(False)
AssertionError: False is not true
======================================================================
FAIL: test_failure (test_subtests.Direct) [failure1]
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jake/code/qiskit/terra/test_subtests.py", line 7, in test_failure
self.assertTrue(False)
AssertionError: False is not true
======================================================================
FAIL: test_failure (test_subtests.Direct) [failure2]
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jake/code/qiskit/terra/test_subtests.py", line 9, in test_failure
self.assertTrue(False)
AssertionError: False is not true
======================================================================
FAIL: test_failure (test_subtests.Full)
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
File "/Users/jake/code/qiskit/terra/test_subtests.py", line 21, in test_failure
self.assertTrue(False)
File "/Users/jake/.miniconda3/envs/qiskit/lib/python3.9/unittest/case.py", line 682, in assertTrue
raise self.failureException(msg)
AssertionError: False is not true
----------------------------------------------------------------------
Ran 3 tests in 0.005s
FAILED (failures=5)
What should happen?
The test_subtests.Full case should also report two failures, and display the message "failure1" or "failure2" on a fail.
Any suggestions?
Likely a problem with testtools or the code we've imported from there into FullQiskitTestCase, similar to #7307, but I didn't want to put them in the same issue in case one part is much easier to solve than the other.
The text was updated successfully, but these errors were encountered:
I believe this is a bug in testtools result handler (especially after #7311) that we use primarily so we can get attachments of stdout, stderr, and pylogging when running in parallel with stestr (without this they just print all at the same time making it hard to debug). We'll have to investigate and report upstream I think to try and fix this.
It's more than just the results handler - the tests actually fail out and stop running on the first failure. I made a simple test that leaked its run state out by touching some files:
Environment
What is happening?
Tests do not run subsequent
unittest.subTest
blocks if one fails, and do not report the parameterisations in use at the time of the failure.How can we reproduce the issue?
An example test file, called
test_subtests.py
:and run with either
python -munittest
orstestr run
gives an example output:What should happen?
The
test_subtests.Full
case should also report two failures, and display the message "failure1" or "failure2" on a fail.Any suggestions?
Likely a problem with
testtools
or the code we've imported from there intoFullQiskitTestCase
, similar to #7307, but I didn't want to put them in the same issue in case one part is much easier to solve than the other.The text was updated successfully, but these errors were encountered: