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 479400 d4959ce127df8f88f78dafcfbba1195444f9a3ee
parent 479399 2d0d0f24a64757bc4e8b5d42b9028c7c0b9142ac
child 479401 0469dce76124d18c153ceecec5d9e8dbf2da1c63
push id44243
push userbmo:ato@mozilla.com
push dateMon, 06 Feb 2017 16:11:43 +0000
reviewersjgraham
bugs1319237
milestone54.0a1
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
testing/web-platform/harness/wptrunner/executors/pytestrunner/runner.py
--- 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)