-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Suppress/fix some test warnings. #11705
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
Conversation
36d6dde
to
886be24
Compare
This is failing on windows which does not really have a float128 type (iirc). |
886be24
to
f936ce8
Compare
should be fixed |
f936ce8
to
da6fd6a
Compare
@@ -1112,7 +1112,8 @@ def _transform(self, a): | |||
""" | |||
Inplace transformation. | |||
""" | |||
masked = np.abs(a) > self.linthresh | |||
with np.errstate(invalid="ignore"): |
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 does this throw an invalid warning in the first place? It's not obvious to me that _transform
should be getting invalid 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.
You can definitely pass nans in (they're ignored at a later stage, by the low-level path handling machinery).
assert res == is_opentype_cff_font(f) | ||
for f in fontManager.ttflist: | ||
if 'otf' in f.name: | ||
with open(f.name, 'rb') as fd: |
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.
This is not hit when the tests are run. Maybe we have to otf fonts on travis?
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.
Dunno, and I can't say I really care about this test given that it's a literaly copy-paste of the function's definition (https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/font_manager.py#L1267).
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 discussed on this week's call, this is actually a real drop in coverage due to a typo (f.name
vs. f.fname
)
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.
Should fix up the typo and not have our test lines execute drop.
da6fd6a
to
f1aed96
Compare
fixed |
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.
Pending CI, including coverage of tests not dropping.
The only remaining test that throws a warning is test_image.py::test_full_invalid ("converting a masked element to nan"), which I didn't suppress in the test because I think that should indeed not throw (we don't throw warnings when passing partially-nan data either).
f1aed96
to
c9a8edb
Compare
Anyone know why the csd test would be failing? |
Probably something with numpy 1.15 being just released? |
The only remaining test that throws a warning is
test_image.py::test_full_invalid ("converting a masked element to nan"),
which I didn't suppress in the test because I think that should indeed
not throw (we don't throw warnings when passing partially-nan data
either).
(I think ultimately we should make CI fail in the presence of warnings;
looks like this can be done by adding the suitable warnings filter to
pytest.ini https://docs.pytest.org/en/latest/warnings.html.)
PR Summary
PR Checklist