From: Donald Sharp Date: Fri, 17 Jun 2022 19:40:14 +0000 (-0400) Subject: tests: Fix regex complaints by python3 X-Git-Tag: base_8.4~301^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=37076cae05323716c5a89905db30b4bda0e85840;p=matthieu%2Ffrr.git tests: Fix regex complaints by python3 Signed-off-by: Donald Sharp --- diff --git a/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py b/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py index 9f4399d6d5..77619e59bb 100644 --- a/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py +++ b/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py @@ -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: diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py index ffdcd08f80..10d890effb 100755 --- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py +++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py @@ -41,7 +41,7 @@ pytestmark = [pytest.mark.bgpd] def build_topo(tgen): - """ + r""" CE1 CE3 CE5 (eth0) (eth0) (eth0) :2 :2 :2 diff --git a/tests/topotests/ospf6_ecmp_inter_area/test_ospf6_ecmp_inter_area.py b/tests/topotests/ospf6_ecmp_inter_area/test_ospf6_ecmp_inter_area.py index 886b52c59c..553f936186 100644 --- a/tests/topotests/ospf6_ecmp_inter_area/test_ospf6_ecmp_inter_area.py +++ b/tests/topotests/ospf6_ecmp_inter_area/test_ospf6_ecmp_inter_area.py @@ -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 diff --git a/tests/topotests/route_scale/scale_test_common.py b/tests/topotests/route_scale/scale_test_common.py index 3557cb4413..856a2d0fa7 100644 --- a/tests/topotests/route_scale/scale_test_common.py +++ b/tests/topotests/route_scale/scale_test_common.py @@ -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(