mirror of
https://github.com/samba-team/samba.git
synced 2025-08-31 22:02:58 +03:00
python:subunit: Fix skipping a test with no reason given
Not specifying a reason means addSkip() is passed an empty string rather than None. As a result, this condition was never hit, and the call to _addOutcome() had an incorrect parameter. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
18394daf1e
commit
3031e8071c
@ -150,8 +150,8 @@ class TestProtocolClient(unittest.TestResult):
|
||||
|
||||
def addSkip(self, test, reason=None):
|
||||
"""Report a skipped test."""
|
||||
if reason is None:
|
||||
self._addOutcome("skip", test, error=None)
|
||||
if not reason:
|
||||
self._addOutcome("skip", test, error_permitted=None)
|
||||
else:
|
||||
self._stream.write("skip: %s [\n" % test.id())
|
||||
self._stream.write("%s\n" % reason)
|
||||
|
Reference in New Issue
Block a user