-
Notifications
You must be signed in to change notification settings - Fork 230
Closed
Labels
Description
Using pytest-cov 2.6.0 and pytest 4.0.0, running py.test --no-cov logs a long traceback with a warning that config.warn is deprecated:
% pipenv run py.test --no-cov
======================================================================================================== test session starts ========================================================================================================
platform linux -- Python 3.6.6, pytest-4.0.0, py-1.7.0, pluggy-0.8.0 -- /home/sybren/.virtualenvs/demo-VU2p87vc/bin/python3
cachedir: .pytest_cache
rootdir: /home/sybren/tmp/demo, inifile: setup.cfg
plugins: cov-2.6.0
collected 1 item
test_dummy.py::test_this PASSED [100%]
WARNING: Coverage disabled via --no-cov switch!
Traceback (most recent call last):
File "/home/sybren/.virtualenvs/demo-VU2p87vc/bin/py.test", line 11, in <module>
sys.exit(main())
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/_pytest/config/__init__.py", line 77, in main
return config.hook.pytest_cmdline_main(config=config)
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/hooks.py", line 284, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/manager.py", line 67, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/manager.py", line 61, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/callers.py", line 208, in _multicall
return outcome.get_result()
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/_pytest/main.py", line 218, in pytest_cmdline_main
return wrap_session(config, _main)
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/_pytest/main.py", line 211, in wrap_session
session=session, exitstatus=session.exitstatus
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/hooks.py", line 284, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/manager.py", line 67, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/manager.py", line 61, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/callers.py", line 203, in _multicall
gen.send(outcome)
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/_pytest/terminal.py", line 639, in pytest_sessionfinish
terminalreporter=self, exitstatus=exitstatus
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/hooks.py", line 284, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/manager.py", line 67, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/manager.py", line 61, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/callers.py", line 208, in _multicall
return outcome.get_result()
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/pytest_cov/plugin.py", line 248, in pytest_terminal_summary
terminalreporter.config.warn(code='COV-1', message=message)
File "/home/sybren/.virtualenvs/demo-VU2p87vc/lib/python3.6/site-packages/_pytest/config/__init__.py", line 662, in warn
lineno=lineno,
_pytest.warning_types.RemovedInPytest4Warning: config.warn has been deprecated, use warnings.warn instead
This can be reproduced by taking the attached demo.tar.gz and running pipenv run py.test --no-cov. I used Python 3.6.6 and Ubuntu 18.04. Note that py.test options are set in the setup.cfg file.
Reactions are currently unavailable