-
Notifications
You must be signed in to change notification settings - Fork 52
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
Bugfix: Fix tests not asserting error expected #464
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #464 +/- ##
===========================================
- Coverage 94.03% 66.55% -27.48%
===========================================
Files 48 48
Lines 4155 4162 +7
===========================================
- Hits 3907 2770 -1137
- Misses 248 1392 +1144
... and 12 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
* Resolves gh-434. Default 6 dimension images to TCZYXS order when array-like * New test for dimension ordering; minor adjustments to existing tests to fix
The actual test fixes branch has been merged into this one + a new commit which removes a test that was previously evergreen and resulted in a I still expect a few tests to fail due to a (unrelated to this PR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thanks for your work on this -- merge whenever
I know I'm a little late with this one, but per pytest's documentation:
It seems like our case points more towards the former which would imply we should be using |
How did this come about?
This came about from this issue where it was noted that
AICSImage
could not instantiate with an array-like image which greater than 5 dimensions. I was able to get around this issue (and also provide a fix in a related follow-up PR here), but while investigating I noticed we had a test case for this already and it was passing even though it shouldn't based on manual testing. This led me to believe this was an evergreen test and going from usingpytest.mark.raises
to using the xfail mark (like sopytest.mark.xfail
) caused the test to fail with a message saying the test did not raise the expected error which was the case in my manual testing.What this PR aims to accomplish
This pull request modifies all ~115 usages of
pytest.mark.raises
topytest.mark.xfail
which caused 5 tests to fail all of which were in theArrayLikeReader
tests. In my follow-up PR I mentioned above I fix the failing tests and resolve the issue aforementioned as well. The goal of this PR is not to merge this without the follow-up PR included to fix the tests, but rather just highlight and display these changes without cluttering the more important to review fixes.Testing
Unit tested locally