From 5201231daab267912d3ca44492c73dae2623275e Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Thu, 5 Jun 2025 04:35:36 +0800 Subject: [PATCH] [test] fix warning of escape in regex string (#11566) --- tests/scripts/thread-cert/node.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/scripts/thread-cert/node.py b/tests/scripts/thread-cert/node.py index 868fa7418..e2a2049aa 100755 --- a/tests/scripts/thread-cert/node.py +++ b/tests/scripts/thread-cert/node.py @@ -1376,7 +1376,7 @@ class NodeImpl: def srp_client_get_lease_interval(self) -> int: cmd = 'srp client leaseinterval' self.send_command(cmd) - return int(self._expect_result('\d+')) + return int(self._expect_result(r'\d+')) def srp_client_set_key_lease_interval(self, leaseinterval: int): cmd = f'srp client keyleaseinterval {leaseinterval}' @@ -1386,7 +1386,7 @@ class NodeImpl: def srp_client_get_key_lease_interval(self) -> int: cmd = 'srp client keyleaseinterval' self.send_command(cmd) - return int(self._expect_result('\d+')) + return int(self._expect_result(r'\d+')) def srp_client_set_ttl(self, ttl: int): cmd = f'srp client ttl {ttl}' @@ -1396,7 +1396,7 @@ class NodeImpl: def srp_client_get_ttl(self) -> int: cmd = 'srp client ttl' self.send_command(cmd) - return int(self._expect_result('\d+')) + return int(self._expect_result(r'\d+')) # # TREL utilities @@ -1613,7 +1613,7 @@ class NodeImpl: self.send_command(cmd) table = {} - for line in self._expect_results("\S+ \d+"): + for line in self._expect_results(r"\S+ \d+"): line = line.split() assert len(line) == 2, line ip = IPv6Address(line[0])