From 5a56cff88ba679629050d05376efb362db5d4bd2 Mon Sep 17 00:00:00 2001 From: Felix Schurk <75752337+felixschurk@users.noreply.github.com> Date: Sun, 31 Mar 2024 16:08:56 +0300 Subject: [PATCH] prefix regex strings to be treated as raw strings (#3322) Source for documentation https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals. Closes #3316. --- test/problems | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/problems b/test/problems index 4da73f586..da3c2606f 100755 --- a/test/problems +++ b/test/problems @@ -52,8 +52,8 @@ if __name__ == "__main__": unexpected = defaultdict(int) passed = defaultdict(int) - file = re.compile("^# (?:./)?(\S+\.t)(?:\.exe)?$") - timestamp = re.compile("^# (\d+(?:\.\d+)?) ==>.*$") + file = re.compile(r"^# (?:./)?(\S+\.t)(?:\.exe)?$") + timestamp = re.compile(r"^# (\d+(?:\.\d+)?) ==>.*$") expected_fail = re.compile(r"^not ok.*?#\s*TODO", re.I) unexpected_pass = re.compile(r"^not ok .*?#\s*FIXED", re.I)