-
Notifications
You must be signed in to change notification settings - Fork 279
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
TST: restore global state modified during tests #4677
TST: restore global state modified during tests #4677
Conversation
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.
good catch, thank you !
here are a couple minor comments but I'd merge it as is
@@ -5,12 +5,13 @@ | |||
from yt.testing import amrspace | |||
from yt.utilities.lib.alt_ray_tracers import _cyl2cart, cylindrical_ray_trace | |||
|
|||
left_grid = right_grid = amr_levels = center_grid = data = None | |||
left_grid = right_grid = amr_levels = center_grid = data = old_settings = None |
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'm not a fan of these all living on the same line. No harm done in keeping the existing one (though I'd also approve expanding it) but I'd rather have the new binding on a separate line.
well... when tests pass, I guess 😅 |
Huh, I have no idea why only py3.9 is failing. I wasn't able to get |
I think I saw this error being flaky a while back in a different context. If I recall correctly this was due to some uninitialised memory being involved in an array division, which may trigger this |
I tried running under valgrind, and the test passed with no memory errors. I'm pretty sure valgrind is just swallowing the FPE signals before numpy can handle them, though; I broke into a pdb session and the image array is all zeros with and without valgrind. I also checked against yt 3.6.1 and got the same error. |
Specifically, numpy's error handling settings and yt's logging level.
65d9946
to
3760d58
Compare
Alright, adding |
I don't think that's necessary. @yt-fido test this please |
@yt-fido test this please |
PR Summary
Restore numpy's error handling settings and yt's logging level during module teardown.
I found that
test_fisheye
inyt/visualization/volume_rendering/tests/test_vr_cameras.py
was failing when I ran just the visualization tests, but not the full test suite.PR Checklist