-
Notifications
You must be signed in to change notification settings - Fork 13
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
Xunit 2.8.1 broke compatibility with skipping tests from fixtures #32
Comments
Interesting. I never considered skipping from a fixture, so that wasn't an intentional feature. |
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. |
…are skipped (#43091) ### Rationale for this change See #43076. The previous Xunit upgrade was reverted due to this breaking how the Python C Data Interface integration tests were skipped. It looks like this is unlikely to be fixed in xunit or xunit.skippablefact soon (see AArnott/Xunit.SkippableFact#32), so I've refactored the tests to work around the issue. ### What changes are included in this PR? Re-update xunit to 2.8.1 and refactor the `CDataSchemaPythonTest` class construction so that skipping these tests when the `PYTHONNET_PYDLL` environment variable isn't set works again. ### Are these changes tested? Yes ### Are there any user-facing changes? No * GitHub Issue: #43076 Authored-by: Adam Reeve <[email protected]> Signed-off-by: Curt Hagenlocher <[email protected]>
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). |
…tests are skipped (apache#43091) ### Rationale for this change See apache#43076. The previous Xunit upgrade was reverted due to this breaking how the Python C Data Interface integration tests were skipped. It looks like this is unlikely to be fixed in xunit or xunit.skippablefact soon (see AArnott/Xunit.SkippableFact#32), so I've refactored the tests to work around the issue. ### What changes are included in this PR? Re-update xunit to 2.8.1 and refactor the `CDataSchemaPythonTest` class construction so that skipping these tests when the `PYTHONNET_PYDLL` environment variable isn't set works again. ### Are these changes tested? Yes ### Are there any user-facing changes? No * GitHub Issue: apache#43076 Authored-by: Adam Reeve <[email protected]> Signed-off-by: Curt Hagenlocher <[email protected]>
I reported this at xunit/xunit#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:
The text was updated successfully, but these errors were encountered: