Closed noBlubb closed 1 year ago
In my local testing #338 does fix this issue and repeat the TestWithSubs/should_(fail)
as expected.
@dnephin Awesome, thank you for being so responsive! I expect our use-case is a bit special in that we parameterize subtests and put those parameters in parentheses as part of the subtest name but I can see others affected by this bug. Do you already have plans for the next release?
Hey all,
we observed that
gotestsum
with--rerun-fails
would sometimes not report (deterministically) failing subtests. Looking into it, the subtests were detected as to be repeated but not picked up. This seems to causegotestsum
to assume no fail => success and mark the repeated attempt as a success:Looking at the exit code we get:
Which is unexpected, as the
TestWithSubs
looks like this:Which will causes
should (fail)
to always fail and therefore should report a non-zero exit code.Trying to reproduce the issue I first named the failing case
should fail
butgotestsum
handled this as expected, reran the case and finally quit with a non-zero exit code:With
It was only when I tried to include some other characters that I discovered that this breaks
gotestsum
's ability to rerun a subtest, e.g. as is the case forTestWithSubs/should_(fail)
. Let me know if this is intended and tests should not use those names but it does seem to work fine withgo test
. Maybe a good opportunity to contribute something togotestsum
from my side if I get around to it.