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.
This commit is contained in:
Felix Schurk
2024-03-31 16:08:56 +03:00
committed by GitHub
parent c91cef43b0
commit 5a56cff88b

View File

@@ -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)