We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple test case:
import warnings import pytest def test_foo(): with pytest.deprecated_call(): warnings.warn("message", DeprecationWarning)
When run with -s, the warning is printed to stdout:
-s
(tempenv-0c76308967598) ~/.v/tempenv-0c76308967598 ❯❯❯ py.test -s test.py ====================================================== test session starts ======================================================= platform darwin -- Python 2.7.13, pytest-3.0.7, py-1.4.33, pluggy-0.4.0 rootdir: /Users/alex_gaynor/.virtualenvs/tempenv-0c76308967598, inifile: collected 1 items test.py /Users/alex_gaynor/.virtualenvs/tempenv-0c76308967598/test.py:8: DeprecationWarning: message warnings.warn("message", DeprecationWarning) . ==================================================== 1 passed in 0.00 seconds ====================================================
My expectation is that the output would be captured internally, and not need to be printed.
Package versions:
(tempenv-0c76308967598) ~/.v/tempenv-0c76308967598 ❯❯❯ pip list Package Version ---------- ------- appdirs 1.4.3 packaging 16.8 pip 9.0.1 py 1.4.33 pyparsing 2.2.0 pytest 3.0.7 setuptools 34.3.3 six 1.10.0 wheel 0.29.0
The text was updated successfully, but these errors were encountered:
@alex according to the history we fixed it in 22864b7 which will be in 3.1 as it got merged as part of #2303
the problem is that our custom code did unconditional calling to the original function, the stdlib one behaves correct from the get go
Sorry, something went wrong.
No branches or pull requests
Simple test case:
When run with
-s
, the warning is printed to stdout:My expectation is that the output would be captured internally, and not need to be printed.
Package versions:
The text was updated successfully, but these errors were encountered: