Bug 1319237 - Allow pytests to be skipped imperatively at runtime; r=jgraham
☠☠ backed out by 4f4dcc23d36b ☠ ☠
authorAndreas Tolfsen <ato@mozilla.com>
Mon, 21 Nov 2016 23:38:42 +0100
changeset 479617 af71a9376bef3c2070703d680170e94b45a05f98
parent 479616 778721edd8b932f7b06a89611f490d80525cd7c8
child 479618 a2096fa29cd762175d01fb38ad826a18aec375d6
push id44315
push usertnguyen@mozilla.com
push dateTue, 07 Feb 2017 02:03:39 +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)