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 442948 22497189c81e8bc0b4f4ec7dd3fa6c9372f4c08b
parent 442947 58e229555bce80def91a538521e8b1db7ef0c365
child 442949 a6a1af5d6cdb38b1a91c875b0abc95ae57826513
push id36874
push userbmo:ato@mozilla.com
push dateWed, 23 Nov 2016 16:09:45 +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)