Bug 1319237 - Allow pytests to be skipped imperatively at runtime; r=jgraham
It is required to skip certain WebDriver tests imperatively at runtime,
such as for the Get Window Size and Get Window Position commands, which
are only available at certain configurations.
MozReview-Commit-ID: 9ERYkYm34iI
--- a/testing/web-platform/harness/wptrunner/executors/pytestrunner/runner.py
+++ b/testing/web-platform/harness/wptrunner/executors/pytestrunner/runner.py
@@ -87,19 +87,17 @@ class SubtestResultRecorder(object):
def record_error(self, report):
# error in setup/teardown
if report.when != "call":
message = "%s error" % report.when
self.record(report.nodeid, "ERROR", message, report.longrepr)
def record_skip(self, report):
- self.record(report.nodeid, "ERROR",
- "In-test skip decorators are disallowed, "
- "please use WPT metadata to ignore tests.")
+ self.record(report.nodeid, "PASS")
def record(self, test, status, message=None, stack=None):
if stack is not None:
stack = str(stack)
new_result = (test, status, message, stack)
self.results.append(new_result)