Disable pytest-warnings during testing#6163
Conversation
|
Just curious: Does this also silence the |
|
No, I don't think so as that is raised by pytest itself, while this silencing is done for warnings that are raised during the tests (similar to the sphinx warnings, the build doesn't fail there for any random warnings, just the ones that are generated by sphinx). |
|
Currently this makes the output of pytest very difficult to read, so 👍 |
|
I'm surprised the open files aren't caught by the tests with the --open-files flag on Travis |
|
@astrofrog - No idea, how is it supposed to work ? Locally it doesn't work, many fits tests are not closing files (and even if I try with another simple txt file). |
Is this because of the |
|
@pllim - Not sure but I would say no, it's probably just an historic remnant. |
|
@saimn - The worrying thing is as, @astrofrog mentioned above, that we're supposed to test for open files. An those tests say there are no open files remained, while in the same time there are all these warnings contradicting it. Even if we don't find the cause, this probably serious enough to get a separate issue. |
|
@bsipocz - Agreed, and btw I'm trying to understand this also for #6082 (comment) |
|
This seems to have no effect, at least I saw tons of warnings at the end of the test session when running the tests from a pip installed version, so ideally we need to come up with a solution that works in those cases, too. |
… not supported any more
astropy/astropy#6163 (thanks Brigitta!)
pytest 3.1.0 included
pytest-warningsin its core [0] and now lists all warning that occurred during testing at the end of the build, which is way too verbose. This PR sets it back to previous behaviour.Obviously, long term we can aim to write tests that don't emit warnings...
[0] https://docs.pytest.org/en/latest/changelog.html#changelog-history