aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API/python_api
diff options
context:
space:
mode:
authorEisuke Kawashima <e.kawaschima+github@gmail.com>2025-02-28 23:59:35 +0900
committerGitHub <noreply@github.com>2025-02-28 14:59:35 +0000
commit24abf2c7285df7b5c1b442df10cd0b090a841358 (patch)
tree6eb50959e3a62c37afa0f442db0c1533ca1108d9 /lldb/test/API/python_api
parent037cf12b0772654225dded8116f48ee23b9285c2 (diff)
downloadllvm-24abf2c7285df7b5c1b442df10cd0b090a841358.zip
llvm-24abf2c7285df7b5c1b442df10cd0b090a841358.tar.gz
llvm-24abf2c7285df7b5c1b442df10cd0b090a841358.tar.bz2
[lldb] fix(lldb/**.py): fix invalid escape sequences (#94034)
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Diffstat (limited to 'lldb/test/API/python_api')
-rw-r--r--lldb/test/API/python_api/address_range/TestAddressRange.py6
-rw-r--r--lldb/test/API/python_api/target-arch-from-module/TestTargetArchFromModule.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/lldb/test/API/python_api/address_range/TestAddressRange.py b/lldb/test/API/python_api/address_range/TestAddressRange.py
index ae4b8c7..3564022 100644
--- a/lldb/test/API/python_api/address_range/TestAddressRange.py
+++ b/lldb/test/API/python_api/address_range/TestAddressRange.py
@@ -191,7 +191,7 @@ class AddressRangeTestCase(TestBase):
interp.HandleCommand(script, result, False)
self.assertTrue(result.Succeeded(), "script command succeeded")
# [0x1000-0x2000] // Resolved with target or addresses without sections
- self.assertRegex(result.GetOutput(), "^\[0x[0-9a-f]+\-0x[0-9a-f]+\)")
+ self.assertRegex(result.GetOutput(), r"^\[0x[0-9a-f]+\-0x[0-9a-f]+\)")
process.Kill()
def test_address_range_print_no_section_resolved(self):
@@ -215,7 +215,7 @@ class AddressRangeTestCase(TestBase):
range_str = str(range)
# [0x1000-0x2000] // Resolved with target or addresses without sections
- self.assertRegex(range_str, "^\[0x[0-9a-f]+\-0x[0-9a-f]+\)$")
+ self.assertRegex(range_str, r"^\[0x[0-9a-f]+\-0x[0-9a-f]+\)$")
process.Kill()
def test_address_range_print_not_resolved(self):
@@ -223,7 +223,7 @@ class AddressRangeTestCase(TestBase):
range = lldb.SBAddressRange(self.addr1, 8)
range_str = str(range)
# a.out[0x1000-0x2000] // Without target
- self.assertRegex(range_str, "^a.out\[0x[0-9a-f]+\-0x[0-9a-f]+\)$")
+ self.assertRegex(range_str, r"^a.out\[0x[0-9a-f]+\-0x[0-9a-f]+\)$")
def test_address_range_list_print(self):
"""Make sure the SBAddressRangeList can be printed."""
diff --git a/lldb/test/API/python_api/target-arch-from-module/TestTargetArchFromModule.py b/lldb/test/API/python_api/target-arch-from-module/TestTargetArchFromModule.py
index 260f37c..0141828 100644
--- a/lldb/test/API/python_api/target-arch-from-module/TestTargetArchFromModule.py
+++ b/lldb/test/API/python_api/target-arch-from-module/TestTargetArchFromModule.py
@@ -34,7 +34,7 @@ class TargetArchFromModule(TestBase):
lambda: os.environ.pop("LLDB_APPLE_DSYMFORUUID_EXECUTABLE", None)
)
- dwarfdump_uuid_regex = re.compile("UUID: ([-0-9a-fA-F]+) \(([^\(]+)\) .*")
+ dwarfdump_uuid_regex = re.compile(r"UUID: ([-0-9a-fA-F]+) \(([^\(]+)\) .*")
dwarfdump_cmd_output = subprocess.check_output(
('/usr/bin/dwarfdump --uuid "%s"' % aout_exe), shell=True
).decode("utf-8")