-
Notifications
You must be signed in to change notification settings - Fork 56
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
xfail for test_G_star_Row_Standardized
#336
xfail for test_G_star_Row_Standardized
#336
Conversation
test_getisord.py::TestGetisG::test_G_star_Row_Standardized
test_G_star_Row_Standardized
esda/tests/test_getisord.py
Outdated
if not record: | ||
pytest.fail("Expected a warning!") |
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.
Why do you do this?
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.
As a fail safe so it fails exactly when no warnings are emitted. I could not figure out how to add that granularity to parametrize_w
without it affecting other tests. Maybe I'm missing something easy? Any thoughts?
I couldn't determine the proper raises
argument for pytest.mark.xfail
and I think having only a general failure is too vague.
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.
But this makes no difference, no? You are just doing explicitly what pytest would do here anyway. I probably don't follow here...
We can also split this into two tests, one checking the warning and the other the values.
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.
I probably don't follow here...
I didn't explain well. What I mean it that I could not find the proper pytest
error type to include in the xfail(raise=)
parameter - the error raised when no warnings are emitted when in pytest.warns
context.
We can also split this into two tests, one checking the warning and the other the values.
This may be the way to go if there isn't a more elegant solution that I am overlooking.
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.
I'd probably split it.
…star_Row_Standardized
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #336 +/- ##
=====================================
Coverage 81.3% 81.3%
=====================================
Files 24 24
Lines 3333 3331 -2
=====================================
Hits 2709 2709
+ Misses 624 622 -2 |
This PR resolves #331