run-tests: give TestResult a skipped attribute
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 19 Apr 2014 14:01:18 -0700
changeset 21307 cd4fd7b3c3c4
parent 21306 cbf5475827da
child 21308 935ade207253
run-tests: give TestResult a skipped attribute
tests/run-tests.py
--- a/tests/run-tests.py	Sat Apr 19 18:31:22 2014 -0700
+++ b/tests/run-tests.py	Sat Apr 19 14:01:18 2014 -0700
@@ -649,6 +649,11 @@
         self.interrupted = False
         self.exception = None
 
+    @property
+    def skipped(self):
+        """Whether the test was skipped."""
+        return self.ret == SKIPPED_STATUS
+
 def pytest(test, wd, options, replacements, env):
     py3kswitch = options.py3k_warnings and ' -3' or ''
     cmd = '%s%s "%s"' % (PYTHON, py3kswitch, test)
@@ -1065,7 +1070,7 @@
     times.append((test, res.duration))
     vlog("# Ret was:", ret)
 
-    skipped = (ret == SKIPPED_STATUS)
+    skipped = res.skipped
 
     # If we're not in --debug mode and reference output file exists,
     # check test output against it.