Comments
Patch
@@ -642,16 +642,21 @@ class TestResult(object):
def __init__(self):
self.ret = None
self.out = None
self.duration = None
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)
vlog("# Running", cmd)
if os.name == 'nt':
replacements.append((r'\r\n', '\n'))
return run(cmd, wd, options, replacements, env)
@@ -1058,17 +1063,17 @@ def runone(options, test, count):
return fail('Exception during execution: %s' % res.exception, 255)
ret = res.ret
out = res.out
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.
if options.debug:
refout = None # to match "out is None"
elif os.path.exists(ref):
f = open(ref, "r")
refout = f.read().splitlines(True)