Skip to content

Commit f356ffd

Browse files
committed
Use shorter tracebacks in the JSON report
1 parent 775d25b commit f356ffd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,8 @@ def pytest_collection_modifyitems(config, items):
126126
ci_mark = next((m for m in markers if m.name == "ci"), None)
127127
if ci_mark is None:
128128
item.add_marker(mark.skip(reason="disabled via --ci"))
129+
130+
# Avoid long tracebacks for the JSON report, which make the file too
131+
# large.
132+
if config.getoption('--json-report'):
133+
config.option.tbstyle = 'native'

0 commit comments

Comments
 (0)