-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
plugin: warningsrelated to the warnings builtin pluginrelated to the warnings builtin plugintopic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errors
Description
While working on scipy/scipy#7572 I noticed that pytest emits the "yield tests are deprecated, and scheduled to be removed in pytest 4.0" warning for each generated test, not per each test generator. (And for scipy, this means the message is printed 15652 times :) -- of course we'll eventually plan to refactor them completely away, but that takes some time.)
There are workarounds such as --disable-warnings
and tagging | uniq
to the end, but it would be nice if this was fixed to be less spammy on the pytest end.
As far as I understand, there's no way to disable this deprecation warning in pytest.ini
without also disabling the whole warning capture mechanism (which is what --disable-pytest-warnings
et al seem to do)?
Minimal repro:
# python -mpytest test_foo.py
def test_foo():
for k in range(10000):
yield lambda x: None, k
```
plat: Linux
$ python --version
Python 2.7.13
$ pip list
pip (9.0.1)
py (1.4.34)
pytest (3.1.3)
setuptools (36.0.1)
wheel (0.29.0)
```
Metadata
Metadata
Assignees
Labels
plugin: warningsrelated to the warnings builtin pluginrelated to the warnings builtin plugintopic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errors