From 04540809aff89b8f35cf32236ba0f2ea39150cf8 Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Fri, 16 Aug 2024 17:36:44 +0200 Subject: [PATCH] tests: Mark regex strings as raw, as required by Python 3.12 --- utils/tests/test-ns3.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/tests/test-ns3.py b/utils/tests/test-ns3.py index 0db4d4f87..e0dc54c33 100755 --- a/utils/tests/test-ns3.py +++ b/utils/tests/test-ns3.py @@ -101,7 +101,7 @@ def run_program(program, args, python=False, cwd=ns3_path, env=None): arguments = [program] if args != "": - arguments.extend(re.findall('(?:".*?"|\S)+', args)) # noqa + arguments.extend(re.findall(r'(?:".*?"|\S)+', args)) # noqa for i in range(len(arguments)): arguments[i] = arguments[i].replace('"', "") @@ -458,7 +458,7 @@ class NS3DependenciesTestCase(unittest.TestCase): # Extract libraries linked to the module modules[module_name_nodir]["libraries"].update( - re.findall("\${lib(.*?)}", "".join(cmake_contents)) + re.findall(r"\${lib(.*?)}", "".join(cmake_contents)) ) modules[module_name_nodir]["libraries"] = list( filter(