Bug 1319237 - Allow pytests to be skipped imperatively at runtime; r?jgraham draft
authorAndreas Tolfsen <ato@mozilla.com>
Mon, 21 Nov 2016 23:38:42 +0100
changeset 442939 5061c610258160d2db04eba9b6fa8f0e34620e3a
parent 442938 2862f4b1112add2731aa18df92583c48dd809cd2
child 442940 4f2640a44196f3743c2ea84cbd5f8d271889e9cd
push id36873
push userbmo:ato@mozilla.com
push dateWed, 23 Nov 2016 16:03:30 +0000
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
@@ -84,19 +84,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)