TST: Globally ignore import error during test collection for doctest#10325
TST: Globally ignore import error during test collection for doctest#10325pllim wants to merge 1 commit intoastropy:masterfrom
Conversation
|
This would give a false negative test result for actual bugs due to unintentional imports. |
TST: Handle wcsaxes test collection without matplotlib.
6f7cd0a to
5748a00
Compare
|
@lpsinger , can you please clarify? With this patch, |
|
Let's say that someone accidentally added an unintended dependency on package |
It would be ignored during collection, but you would think the tests that try to use that dependency would error out during run time, no? Still, if unwanted dependency is added but somehow not used in testing, then yeah, I guess that would sneak pass. I am hoping in that case, we would catch it in code review, because the coverage would report that the LOC is not tested. 🤷 |
|
In addition, the name |
|
Okay, I realized that my PR title and original text was misleading. Sorry! Hopefully, I clarified them. |
|
Hi humans 👋 - this pull request hasn't had any new commits for approximately 5 months. I plan to close this in a month if the pull request doesn't have any new commits by then. In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock. If you believe I commented on this pull request incorrectly, please report this here. |
|
I think it is safe to close this |
|
@astrofrog , any idea for #10302 then? |
Description
This pull request is to globally ignore import errors during doctest collection by
pytest. This also movesimportorskipout from module level to test level.Closes #10302 (cc @lpsinger)
Also discussed in scientific-python/pytest-doctestplus#103 (comment) and #10260 (comment) .