55import random
66import time
77
8- from tests .common .dualtor .dual_tor_common import active_active_ports # noqa F401
8+ from tests .common .dualtor .dual_tor_common import active_active_ports # noqa: F401
99from tests .common .dualtor .dual_tor_common import ActiveActivePortID
10- from tests .common .dualtor .dual_tor_utils import upper_tor_host # noqa F401
11- from tests .common .dualtor .dual_tor_utils import lower_tor_host # noqa F401
12- from tests .common .dualtor .icmp_responder_control import pause_icmp_responder # noqa F401
10+ from tests .common .dualtor .dual_tor_utils import upper_tor_host # noqa: F401
11+ from tests .common .dualtor .dual_tor_utils import lower_tor_host # noqa: F401
12+ from tests .common .dualtor .icmp_responder_control import pause_icmp_responder # noqa: F401
1313from tests .common .dualtor .nic_simulator_control import ForwardingState
14- from tests .common .dualtor .nic_simulator_control import mux_status_from_nic_simulator # noqa F401
15- from tests .common .dualtor .nic_simulator_control import toggle_active_active_simulator_ports # noqa F401
16- from tests .common .fixtures .ptfhost_utils import run_icmp_responder # noqa F401
14+ from tests .common .dualtor .nic_simulator_control import mux_status_from_nic_simulator # noqa: F401
15+ from tests .common .dualtor .nic_simulator_control import toggle_active_active_simulator_ports # noqa: F401
16+ from tests .common .fixtures .ptfhost_utils import run_icmp_responder # noqa: F401
1717
1818from tests .common .helpers .assertions import pytest_assert
1919from tests .common .utilities import wait_until
2626
2727
2828@pytest .fixture (scope = "module" )
29- def test_duthost (upper_tor_host , lower_tor_host ): # noqa F811
29+ def test_duthost (upper_tor_host , lower_tor_host ): # noqa: F811
3030 today = datetime .datetime .fromtimestamp (time .time ())
3131 if today .day % 2 == 1 :
3232 duthost = upper_tor_host
@@ -38,7 +38,7 @@ def test_duthost(upper_tor_host, lower_tor_host): # noqa F811
3838
3939
4040@pytest .fixture (scope = "module" )
41- def test_mux_ports (active_active_ports ): # noqa F811
41+ def test_mux_ports (active_active_ports ): # noqa: F811
4242 if not active_active_ports :
4343 pytest .skip ("Skip as no 'active-active' mux ports available" )
4444 test_ports = random .sample (active_active_ports , min (len (active_active_ports ), TEST_COUNT ))
@@ -52,8 +52,8 @@ def init_port_state(request):
5252
5353
5454@pytest .fixture
55- def setup_test_ports (init_port_state , mux_status_from_nic_simulator , # noqa F811
56- pause_icmp_responder , test_mux_ports ): # noqa F811
55+ def setup_test_ports (init_port_state , mux_status_from_nic_simulator , # noqa: F811
56+ pause_icmp_responder , test_mux_ports ): # noqa: F811
5757
5858 def check_forwarding_state (mux_ports , upper_tor_forwarding_state , lower_tor_forwarding_state ):
5959 mux_status = mux_status_from_nic_simulator (mux_ports )
@@ -89,7 +89,7 @@ def get_mux_status(duthost, mux_ports):
8989
9090
9191def test_grpc_server_failure (init_port_state , setup_test_ports , test_duthost ,
92- toggle_active_active_simulator_ports ): # noqa F811
92+ toggle_active_active_simulator_ports ): # noqa: F811
9393 """
9494 This testcase aims to verify that, if the nic_simulator arbitrarily toggles a
9595 port, SONiC could detect and recover the mux status.
@@ -135,7 +135,7 @@ def check_mux_status_recovery(duthost, mux_ports, orig_mux_status):
135135@pytest .mark .skip_active_standby
136136@pytest .mark .parametrize ("mux_status" , ["standby" , "active" ])
137137def test_mux_forwarding_state_consistency (mux_status , test_mux_ports , test_duthost ,
138- toggle_active_active_simulator_ports ): # noqa F811
138+ toggle_active_active_simulator_ports ): # noqa: F811
139139 """
140140 This testcase aims to verify that, if the nic_simulator forwarding state changes incorrectly,
141141 SONiC could detect and recover the mux status.
0 commit comments