Commit ed10d9cf authored by Mickaël Schoentgen's avatar Mickaël Schoentgen Committed by Jie Luo

Fix several DeprecationWarning: invalid escape sequence (#5897)

Signed-off-by: 's avatarMickaël Schoentgen <contact@tiger-222.fr>
parent a0a8c6cd
......@@ -29,7 +29,7 @@ def __get_data_size(filename):
def __extract_file_name(file_name):
name_list = re.split("[/\.]", file_name)
name_list = re.split(r"[/\.]", file_name)
short_file_name = ""
for name in name_list:
if name[:14] == "google_message":
......@@ -213,7 +213,7 @@ def __parse_go_result(filename):
filename = os.path.dirname(os.path.abspath(__file__)) + '/' + filename
with open(filename) as f:
for line in f:
result_list = re.split("[\ \t]+", line)
result_list = re.split(r"[\ \t]+", line)
if result_list[0][:9] != "Benchmark":
continue
first_slash_index = result_list[0].find('/')
......
......@@ -248,7 +248,7 @@ class TextFormatTest(unittest.TestCase):
.replace('e-0','e-').replace('e-0','e-')
# Floating point fields are printed with .0 suffix even if they are
# actualy integer numbers.
text = re.compile('\.0$', re.MULTILINE).sub('', text)
text = re.compile(r'\.0$', re.MULTILINE).sub('', text)
return text
def testMergeGolden(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment