Bug 1411052 - Show local variables in wdspec tracebacks. r?maja_zf draft
authorAndreas Tolfsen <ato@sny.no>
Mon, 23 Oct 2017 22:23:06 +0100
changeset 684989 82ed9e058d3c81a26014a15a2ae4d071498edc89
parent 684930 1488c7223fcc8fc19632664efa58b63d794a63db
child 737020 9daf94d3d9b8e800df148324fc3750a02c1d1ffe
push id85789
push userbmo:ato@sny.no
push dateMon, 23 Oct 2017 21:25:55 +0000
reviewersmaja_zf
bugs1411052
milestone58.0a1
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
testing/web-platform/tests/tools/wptrunner/wptrunner/executors/pytestrunner/runner.py
--- 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