Skip to content

TST: Ignore convolution test warnings#7983

Merged
bsipocz merged 3 commits intoastropy:masterfrom
pllim:fix-warn-convolution
Oct 27, 2018
Merged

TST: Ignore convolution test warnings#7983
bsipocz merged 3 commits intoastropy:masterfrom
pllim:fix-warn-convolution

Conversation

@pllim
Copy link
Member

@pllim pllim commented Oct 26, 2018

This PR gets rid of most of the warnings seen when removing addopts = -p no:warnings in setup.cfg and then running python setup.py test -P convolution --remote-data.

These still exist because I am not sure how to handle them:

=============================== warnings summary ===============================
astropy/convolution/tests/test_convolve.py::TestConvolve1D::()::test_list
  .../importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
    return f(*args, **kwds)

astropy/convolution/tests/test_convolve.py::test_astropy_convolution_against_scipy
  .../importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
    return f(*args, **kwds)

docs/convolution/kernels.rst
  .../re.py:212: FutureWarning: split() requires a non-empty pattern match.
    return _compile(pattern, flags).split(string, maxsplit)

-- Docs: http://doc.pytest.org/en/latest/warnings.html
======= 1078 passed, 2 skipped, 14 xfailed, 3 warnings in 10.65 seconds ========

The ImportWarning is probably same as #6025. As for the re warning, it is scientific-python/pytest-doctestplus#29.

Also see #7928

@astropy-bot
Copy link

astropy-bot bot commented Oct 26, 2018

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.

@pllim pllim force-pushed the fix-warn-convolution branch from 7a584e4 to d7a0478 Compare October 27, 2018 16:09
@pllim
Copy link
Member Author

pllim commented Oct 27, 2018

I applied @keflavich 's patch here and switch to using pytest.warns. Hopefully it is much cleaner now.

@bsipocz bsipocz merged commit bf756d8 into astropy:master Oct 27, 2018
@bsipocz
Copy link
Member

bsipocz commented Oct 27, 2018

thank you @pllim and @keflavich!

@pllim pllim deleted the fix-warn-convolution branch October 27, 2018 20:59
bsipocz added a commit that referenced this pull request Oct 30, 2018
TST: Ignore convolution test warnings
@bsipocz bsipocz modified the milestones: v2.0.10, v3.1 Nov 9, 2018
@bsipocz
Copy link
Member

bsipocz commented Nov 9, 2018

This doesn't work that well with 2.0.10, and given that convolution changed a lot anyway, I don't even attempt to backport it but leave it in 3.1 only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants