Closed adamreeve closed 5 days ago
Interesting. I never considered skipping from a fixture, so that wasn't an intentional feature. I hope we can get it working again for you, but I don't anticipate having time to investigate soon. Do you have interest in investigating this?
I don't really have time to investigate this either. We can work around it by adding a constructor to the test class and skipping from there instead, so I'm happy if you want to close this as not supported, but I thought it was worth reporting at least.
More discussion back in the original issue, but suffice to say that I believe this isn't a bug in SkippableFact. Throwing from fixtures and having it propagate down into the test itself was an unintentional bug that got fixed in 2.8.1. Throwing fixtures should've always prevented the test from running, and that's now the case in 2.8.1 (the previously bug was that it only failed if you accepted that fixture from the constructor of the unit test).
I reported this at https://github.com/xunit/xunit/issues/2965 but was told it's an issue for SkippableFact. Is this something that can be fixed or do we need to find another way to achieve this?
Test class:
csproj:
With Xunit 2.8.0, running
dotnet test
gives:With 2.8.1 I get: