test: fix incorrect character escaping in data-parse-test

This commit is contained in:
Yaroslav Chvanov
2022-12-22 02:51:43 +03:00
parent 8e798c74c9
commit 10f03eaf0e

View File

@@ -207,7 +207,7 @@ def validate_data_file_name(path: str):
# Matching any of the characters in the regular expression will throw an
# error. Currently only tests the square brackets [], parentheses, and curly
# braces.
illegal_characters_regex = '([\[\]\{\}\(\)])'
illegal_characters_regex = '([\\[\\]\\{\\}\\(\\)])'
found_characters = re.findall(illegal_characters_regex, path)
if found_characters:
raise AssertionError("data file name '{}' contains illegal characters: '{}'".format(path, ''.join(found_characters)))