From 517b398c5403cd2c6943225d2cfb6c107b70eabf Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Mon, 8 May 2023 04:52:53 +0200 Subject: [PATCH] test: fix invalid escape sequence Running the tests leads to test/test_litmus.py:110 test/test_litmus.py:110: DeprecationWarning: invalid escape sequence '\d' if len(re.findall('^ *\d+\.', line)): '\d' can appear in a regular expression but is invalid in a Unicode string. Convert the Unicode string to a regular expression. Signed-off-by: Heinrich Schuchardt --- test/test_litmus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_litmus.py b/test/test_litmus.py index 6e1de65..05f603d 100644 --- a/test/test_litmus.py +++ b/test/test_litmus.py @@ -72,7 +72,7 @@ def test_run_litmus(self): for line in lines: line = line.split('\r')[-1] result.append(line) - if len(re.findall('^ *\d+\.', line)): + if len(re.findall(r'^ *\d+\.', line)): assert line.endswith('pass'), line finally: @@ -107,7 +107,7 @@ def test_run_litmus_noauth(self): for line in lines: line = line.split('\r')[-1] result.append(line) - if len(re.findall('^ *\d+\.', line)): + if len(re.findall(r'^ *\d+\.', line)): assert line.endswith('pass'), line finally: