summaryrefslogtreecommitdiff
path: root/test/RegressTests.py
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2024-02-25 17:40:19 +0100
committerJohn Wiegley <johnw@newartisans.com>2024-07-08 10:12:07 -0700
commit815305b94864556c994934c7a7c830da7de1d94e (patch)
tree6d85f089b05520416eee1f51f80636b357cda73d /test/RegressTests.py
parent0b561c7304ec82807212bd070fc6a1684c67607b (diff)
downloadfork-ledger-815305b94864556c994934c7a7c830da7de1d94e.tar.gz
fork-ledger-815305b94864556c994934c7a7c830da7de1d94e.tar.bz2
fork-ledger-815305b94864556c994934c7a7c830da7de1d94e.zip
Use Python raw strings for regex methods argument
Diffstat (limited to 'test/RegressTests.py')
-rwxr-xr-xtest/RegressTests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/RegressTests.py b/test/RegressTests.py
index 1804d32e..526c8f7c 100755
--- a/test/RegressTests.py
+++ b/test/RegressTests.py
@@ -61,7 +61,7 @@ class RegressFile(object):
while line:
if line.startswith("test "):
command = line[5:]
- match = re.match('(.*) -> ([0-9]+)', command)
+ match = re.match(r'(.*) -> ([0-9]+)', command)
if match:
test.command = self.transform_line(match.group(1))
test.exitcode = int(match.group(2))
@@ -106,13 +106,13 @@ class RegressFile(object):
return
if test.command.find('-f ') != -1:
test.command = '$ledger ' + test.command
- if re.search('-f (-|/dev/stdin)(\s|$)', test.command):
+ if re.search(r'-f (-|/dev/stdin)(\s|$)', test.command):
use_stdin = True
else:
test.command = f'$ledger -f "{str(self.filename.resolve())}" {test.command}'
p = harness.run(test.command,
- columns=(not re.search('--columns', test.command)))
+ columns=(not re.search(r'--columns', test.command)))
if use_stdin:
fd = open(self.filename, encoding='utf-8')