We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
traceback
1 parent c2aa548 commit 65b1f46Copy full SHA for 65b1f46
tests/test_eager_preimports.py
@@ -97,9 +97,9 @@ def wrapper_pytest(request: pytest.FixtureRequest) -> None:
97
# If setting up the test item fails (e.g. due to `pytest`
98
# refactoring), fall back to the vanilla implementation with
99
# a warning
100
+ tb_lines = traceback.format_exception(type(e), e, e.__traceback__)
101
msg = ('failed to convert `doctest.DocTest` into '
- '`pytest.Item`:\n\n'
102
- f'{"".join(traceback.format_exception(e))}\n'
+ f'`pytest.Item`:\n\n{"".join(tb_lines)}\n'
103
'falling back to vanilla `doctest`')
104
warnings.warn(msg)
105
return wrapper_vanilla()
0 commit comments