aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/develop/py_testing.rst7
-rwxr-xr-xtest/py/test.py5
2 files changed, 12 insertions, 0 deletions
diff --git a/doc/develop/py_testing.rst b/doc/develop/py_testing.rst
index 4f1e1f6..52238ca 100644
--- a/doc/develop/py_testing.rst
+++ b/doc/develop/py_testing.rst
@@ -103,6 +103,13 @@ will be written to `${build_dir}/test-log.html`. This is best viewed in a web
browser, but may be read directly as plain text, perhaps with the aid of the
`html2text` utility.
+Controlling output
+~~~~~~~~~~~~~~~~~~
+
+By default a short backtrace is reported. If you would like a longer one,
+pass ``--tb=long`` when running the test. See the pytest documentation for
+more options.
+
Running tests in parallel
~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/test/py/test.py b/test/py/test.py
index 285fda5..95859a6 100755
--- a/test/py/test.py
+++ b/test/py/test.py
@@ -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))