Bug 1411052 - Show local variables in wdspec tracebacks. r?maja_zf
Using the "--showlocals" pytest flag we can show the values of
variables in the local scope in the pytest tracebacks. This seems
like a good thing to do to ease debugging.
Thanks-to: Dave Hunt <dave.hunt@gmail.com>
MozReview-Commit-ID: F62untoxEyi
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/pytestrunner/runner.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/pytestrunner/runner.py
@@ -51,16 +51,17 @@ def run(path, server_config, session_con
# TODO(ato): Deal with timeouts
with TemporaryDirectory() as cache:
pytest.main(["--strict", # turn warnings into errors
"--verbose", # show each individual subtest
"--capture", "no", # enable stdout/stderr from tests
"--basetemp", cache, # temporary directory
+ "--showlocals", # display contents of variables in local scope
"-p", "no:mozlog", # use the WPT result recorder
"-p", "no:cacheprovider", # disable state preservation across invocations
path],
plugins=plugins)
return recorder.results