Bug 1470530 - [wptrunner] Correct the warning to error option for pytest.
Currently the "--strict" option is used to turn warnings into
errors. But even the help content says that, it is not true.
Instead this option is only used for markers.
To actually turn warnings into errors the "-W error" option
would have to be used.
More details see:
https://github.com/pytest-dev/pytest/issues/2444
MozReview-Commit-ID: AQMwZlwC46w
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/pytestrunner/runner.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/pytestrunner/runner.py
@@ -46,17 +46,17 @@ def run(path, server_config, session_con
os.environ["WD_CAPABILITIES"] = json.dumps(session_config["capabilities"])
os.environ["WD_SERVER_CONFIG"] = json.dumps(server_config.as_dict())
harness = HarnessResultRecorder()
subtests = SubtestResultRecorder()
with TemporaryDirectory() as cache:
try:
- pytest.main(["--strict", # turn warnings into errors
+ pytest.main(["-W error", # turn warnings into errors
"-vv", # show each individual subtest and full failure logs
"--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
"-o=console_output_style=classic", # disable test progress bar
path],