summaryrefslogtreecommitdiff
path: root/python/subunit/__init__.py
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2009-02-15 22:55:00 +1100
committerRobert Collins <robertc@robertcollins.net>2009-02-15 22:55:00 +1100
commitf05660cc320295024d7db8758bde540f319314c3 (patch)
tree4129307512de6ee14240e112702485833e5d27a3 /python/subunit/__init__.py
parenta212722f3f93a8d8bc3620d0ac5276e1491cee29 (diff)
downloadsubunit-git-f05660cc320295024d7db8758bde540f319314c3.tar.gz
Review feedback.
Diffstat (limited to 'python/subunit/__init__.py')
-rw-r--r--python/subunit/__init__.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py
index ce34b0f..f63a3a0 100644
--- a/python/subunit/__init__.py
+++ b/python/subunit/__init__.py
@@ -523,13 +523,11 @@ def TAP2SubUnit(tap, subunit):
subunit.write("]\n")
continue
# not a plan line, or have seen one before
- #match = re.match("(ok|not ok)\s+(\d+)?\s*([^#]*)\s*(?:#\s+(.*))\n", line)
match = re.match("(ok|not ok)(?:\s+(\d+)?)?(?:\s+([^#]*[^#\s]+)\s*)?(?:\s+#\s+(TODO|SKIP)(?:\s+(.*))?)?\n", line)
if match:
# new test, emit current one.
_emit_test()
status, number, description, directive, directive_comment = match.groups()
- # status, number, description = match.groups()
if status == 'ok':
result = 'success'
else:
@@ -583,11 +581,13 @@ def tag_stream(original, filtered, tags):
:param filtered: The output stream.
:param tags: The tags to apply. As in a normal stream - a list of 'TAG' or
'-TAG' commands.
+
A 'TAG' command will add the tag to the output stream,
and override any existing '-TAG' command in that stream.
Specifically:
* A global 'tags: TAG' will be added to the start of the stream.
* Any tags commands with -TAG will have the -TAG removed.
+
A '-TAG' command will remove the TAG command from the stream.
Specifically:
* A 'tags: -TAG' command will be added to the start of the stream.
@@ -629,7 +629,8 @@ class ProtocolTestCase(object):
return self.run(result)
def run(self, result=None):
- if result is None: result = self.defaultTestResult()
+ if result is None:
+ result = self.defaultTestResult()
protocol = TestProtocolServer(result)
for line in self._stream:
protocol.lineReceived(line)
@@ -678,5 +679,5 @@ class TestResultStats(unittest.TestResult):
self.tags.update(test.tags)
def wasSuccessful(self):
- "Tells whether or not this result was a success"
+ """Tells whether or not this result was a success"""
return self.failed_tests == 0