-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-running of failed tests does not handle multiple levels of subtests #341
Comments
Thank you for the bug report! The missing Line 141 in 049fc26
The second issue it a bit more nuanced and more difficult to solve. There's no way to run a Go sub test without running its parent. The sub tests are defined dynamically in code, so you can't discover them without running their parent. In your example When I first wrote this there were limitations with the I think |
I opened #342 to address the regex generation bug |
I took a crack at fixing the problem in |
I created #347 to track a future improvement of running all the tests in a package at once, instead of each test individually. I believe this issue should be fixed now so I'm going to close it. |
If you have multiple levels of nesting for subtests, the re-running of failed tests does not handle re-running properly and will end up running all the levels in-between the root and the subtest.
Example JSON output:
This should end up running:
but it runs:
Notice there are two errors here:
^TestParent$/^TestNested$/^TestTwo$
(missing$
and^
around second/
)TestParent/TestNested
.I do not know what is causing error number 1, but I tracked the cause for number 2 down to the
hasSubTestFailed
being incorrect for the in-between levels. I added a test case that fails if added totestjson/execution_test.go
:The text was updated successfully, but these errors were encountered: