[Pytest-commit] [pytest-dev/pytest] 2e61f7: Support PEP-415's Exception.__suppress_context__
Bruno Oliveira
nicoddemus at gmail.com
Sun Jul 30 16:22:42 EDT 2017
Branch: refs/heads/features
Home: https://github.com/pytest-dev/pytest
Commit: 2e61f702c09899bf375dba0c59eec3760fdd8990
https://github.com/pytest-dev/pytest/commit/2e61f702c09899bf375dba0c59eec3760fdd8990
Author: Jordan Moldow <jmoldow at box.com>
Date: 2017-07-29 (Sat, 29 Jul 2017)
Changed paths:
M AUTHORS
M _pytest/_code/code.py
A changelog/2631.feature
M testing/code/test_excinfo.py
Log Message:
-----------
Support PEP-415's Exception.__suppress_context__
PEP-415 states that `exception.__context__` should be suppressed
in traceback outputs, if `exception.__suppress_context__` is
`True`.
Now if a ``raise exception from None`` is caught by pytest,
pytest will no longer chain the context in the test report.
The algorithm in `FormattedExcinfo` now better matches the one
in `traceback.TracebackException`.
`Exception.__suppress_context__` is available in all of the
versions of Python 3 that are supported by pytest.
Fixes #2631.
Commit: 713f7636e1d18cf5f817906ae1505cc9633c571b
https://github.com/pytest-dev/pytest/commit/713f7636e1d18cf5f817906ae1505cc9633c571b
Author: Bruno Oliveira <nicoddemus at gmail.com>
Date: 2017-07-30 (Sun, 30 Jul 2017)
Changed paths:
M AUTHORS
M _pytest/_code/code.py
A changelog/2631.feature
M testing/code/test_excinfo.py
Log Message:
-----------
Merge pull request #2632 from jmoldow/pep_0415_suppress_exception_context
Support PEP-415's Exception.__suppress_context__
Compare: https://github.com/pytest-dev/pytest/compare/4cd87273791d...713f7636e1d1
More information about the pytest-commit
mailing list