tests: Fix regex complaints by python3

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2022-06-17 15:40:14 -04:00
parent 8a8fd10a47
commit 37076cae05
4 changed files with 4 additions and 4 deletions

View File

@ -169,7 +169,7 @@ def test_bgp_converge():
for i in range(1, 2):
for view in range(1, 4):
notConverged = tgen.net["r%s" % i].cmd(
'vtysh -c "show ip bgp view %s summary" 2> /dev/null | grep ^[0-9] | grep -vP " 11\s+(\d+)"'
r'vtysh -c "show ip bgp view %s summary" 2> /dev/null | grep ^[0-9] | grep -vP " 11\s+(\d+)"'
% view
)
if notConverged:

View File

@ -41,7 +41,7 @@ pytestmark = [pytest.mark.bgpd]
def build_topo(tgen):
"""
r"""
CE1 CE3 CE5
(eth0) (eth0) (eth0)
:2 :2 :2

View File

@ -21,7 +21,7 @@
# OF THIS SOFTWARE.
#
"""
r"""
test_ospf6_ecmp_inter_area.py: Test OSPFv3 ECMP inter-area nexthop update
Check proper removal of ECMP nexthops after a path used by one nexthop

View File

@ -158,7 +158,7 @@ def route_install_helper(iter):
# Avoid top ecmp case for runs with < 4G memory
output = tgen.net.cmd_raises("free")
m = re.search("Mem:\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)", output)
m = re.search(r"Mem:\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)", output)
total_mem = int(m.group(2))
if total_mem < 4000000 and iter == 5:
logger.info(