pytest: Shorten traceback length by default

This produces a lot of code output which is not very helpful and is quite
annoying to wade through. Use the short format by default.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2021-10-05 20:18:00 -06:00
committed by Tom Rini
parent 927e0eedfc
commit b04f64aa48
2 changed files with 12 additions and 0 deletions

View File

@@ -17,4 +17,9 @@ if __name__ == '__main__':
# argv; py.test test_directory_name user-supplied-arguments
args = [os.path.dirname(__file__) + '/tests']
args.extend(sys.argv)
# Use short format by default
if not [arg for arg in args if '--tb=' in arg]:
args.append('--tb=short')
sys.exit(pytest.main(args))