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 482812 5fed98284ab6f32009cdb1fa819cf2337adb4a73
parent 482811 ed166d858412698e320555c5485d2bfb9b4173b1
child 482813 0776803493f7175d1c408c50f06fa6112c196abc
push id45172
push userbmo:ato@mozilla.com
push dateMon, 13 Feb 2017 14:08:30 +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)