summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMatthew Treinish <mtreinish@kortar.org>2021-06-15 13:21:28 -0400
committerGitHub <noreply@github.com>2021-06-15 13:21:28 -0400
commitb935a4a1fae460502e2251a25fa3d97379cf4ad3 (patch)
treee33c1bfe5c6e78e8be63633ca6927af97bb7a80e /python
parentdbd9fbd1b89d1b9a35313e5b86549e0d189e69a8 (diff)
parent1c82fee86b1778335680416b9a0041a579d02714 (diff)
downloadsubunit-git-b935a4a1fae460502e2251a25fa3d97379cf4ad3.tar.gz
Merge branch 'master' into testtools.compat
Diffstat (limited to 'python')
-rw-r--r--python/subunit/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py
index 6ced322..cf4692a 100644
--- a/python/subunit/__init__.py
+++ b/python/subunit/__init__.py
@@ -1037,7 +1037,7 @@ def TAP2SubUnit(tap, output_stream):
file_name=file_name, runnable=False)
for line in tap:
if state == BEFORE_PLAN:
- match = re.match("(\d+)\.\.(\d+)\s*(?:\#\s+(.*))?\n", line)
+ match = re.match(r"(\d+)\.\.(\d+)\s*(?:\#\s+(.*))?\n", line)
if match:
state = AFTER_PLAN
_, plan_stop, comment = match.groups()
@@ -1050,7 +1050,7 @@ def TAP2SubUnit(tap, output_stream):
file_name='tap comment')
continue
# not a plan line, or have seen one before
- match = re.match("(ok|not ok)(?:\s+(\d+)?)?(?:\s+([^#]*[^#\s]+)\s*)?(?:\s+#\s+(TODO|SKIP|skip|todo)(?:\s+(.*))?)?\n", line)
+ match = re.match(r"(ok|not ok)(?:\s+(\d+)?)?(?:\s+([^#]*[^#\s]+)\s*)?(?:\s+#\s+(TODO|SKIP|skip|todo)(?:\s+(.*))?)?\n", line)
if match:
# new test, emit current one.
_emit_test()
@@ -1078,7 +1078,7 @@ def TAP2SubUnit(tap, output_stream):
test_name = "test %d%s" % (plan_start, description)
plan_start += 1
continue
- match = re.match("Bail out\!(?:\s*(.*))?\n", line)
+ match = re.match(r"Bail out\!(?:\s*(.*))?\n", line)
if match:
reason, = match.groups()
if reason is None:
@@ -1090,7 +1090,7 @@ def TAP2SubUnit(tap, output_stream):
result = "fail"
state = SKIP_STREAM
continue
- match = re.match("\#.*\n", line)
+ match = re.match(r"\#.*\n", line)
if match:
log.append(line[:-1])
continue