Merge pull request #9819 from donaldsharp/deprecation_python

tests: Fix `Invalid escape sequence` warnings in test runs
This commit is contained in:
Russ White 2021-10-13 13:55:06 -04:00 committed by GitHub
commit c9adeefcfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@ from lib import topotest
ret = luCommand(
"r2",
"ip -M route show",
"\d*(?= via inet 10.0.2.4 dev r2-eth1)",
r"\d*(?= via inet 10.0.2.4 dev r2-eth1)",
"wait",
"See mpls route to r4",
)
@ -16,7 +16,7 @@ if ret != False and found != None:
ret = luCommand(
"r2",
"ip -M route show",
"\d*(?= via inet 10.0.1.1 dev r2-eth0)",
r"\d*(?= via inet 10.0.1.1 dev r2-eth0)",
"wait",
"See mpls route to r1",
)

View File

@ -21,7 +21,7 @@ for rtr in rtrs:
ret = luCommand(
rtr,
'vtysh -c "show memory"',
"zebra: System allocator statistics: Total heap allocated: *(\d*) ([A-Za-z]*) .*bgpd: System allocator statistics: Total heap allocated: *(\d*) ([A-Za-z]*)",
r"zebra: System allocator statistics: Total heap allocated: *(\d*) ([A-Za-z]*) .*bgpd: System allocator statistics: Total heap allocated: *(\d*) ([A-Za-z]*)",
"none",
"collect bgpd memory stats",
)
@ -188,7 +188,7 @@ else:
ret = luCommand(
rtr,
'vtysh -c "show memory"',
"zebra: System allocator statistics: Total heap allocated: *(\d*) ([A-Za-z]*) .*bgpd: System allocator statistics: Total heap allocated: *(\d*) ([A-Za-z]*)",
r"zebra: System allocator statistics: Total heap allocated: *(\d*) ([A-Za-z]*) .*bgpd: System allocator statistics: Total heap allocated: *(\d*) ([A-Za-z]*)",
"none",
"collect bgpd memory stats",
)

View File

@ -291,7 +291,7 @@ def ltemplateVersionCheck(
# collect/log info on iproute2
cc = ltemplateRtrCmd()
found = cc.doCmd(
tgen, rname, "apt-cache policy iproute2", "Installed: ([\d\.]*)"
tgen, rname, "apt-cache policy iproute2", r"Installed: ([\d\.]*)"
)
if found != None:
iproute2Ver = found.group(1)