TST: Fix cosmology test warnings#7992
Conversation
|
Hi there @pllim 👋 - thanks for the pull request! I'm just a friendly 🤖 that checks for issues related to the changelog and making sure that this pull request is milestoned and labeled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part 😃. Everything looks good from my point of view! 👍 If there are any issues with this message, please report them here. |
| cosmo = core.FlatLambdaCDM(H0=70, Om0=0.27, Tcmb0=2.0) | ||
| assert cosmo.comoving_distance(1.0).unit == u.Mpc | ||
| with pytest.warns(RuntimeWarning, match='numpy.dtype size changed'): | ||
| assert cosmo.comoving_distance(1.0).unit == u.Mpc |
There was a problem hiding this comment.
I'm curious where this warning comes from - that's normally the kind of warning that happens when numpy has some installation issues... Do you understand why the warning happens?
There was a problem hiding this comment.
I don't see the warning locally, so part of me thinks this is an issue specific to your installation (maybe scipy was compiled with an older version of numpy). I think this warning check should be removed.
There was a problem hiding this comment.
Do you understand why the warning happens?
I don't know. I probably did something unholy in my conda environment.
aconley
left a comment
There was a problem hiding this comment.
Looks good to me.
Thanks for doing this.
|
Need another approval for merging 😬 . Thanks for review, @aconley ! |
|
Thanks @pllim! |
TST: Fix cosmology test warnings
This PR gets rid of most of the warnings seen when removing
addopts = -p no:warningsinsetup.cfgand then runningpython setup.py test -P cosmology --remote-data.These still exist because I am not sure how to handle them:
rewarning from FutureWarning: split() requires a non-empty pattern match scientific-python/pytest-doctestplus#29Also see #7928