1- from tests .utils ._fake_python_panel_servicer import FakePythonPanelServicer
1+ from tests .utils ._fake_python_panel_service import FakePythonPanelService
22from tests .utils ._port_panel import PortPanel
33
44
@@ -9,10 +9,10 @@ def test___panel___has_panel_id_and_panel_uri() -> None:
99
1010
1111def test___connected_panel___set_value___gets_same_value (
12- fake_python_panel_service : tuple [ FakePythonPanelServicer , int ] ,
12+ fake_python_panel_service : FakePythonPanelService ,
1313) -> None :
14- _ , port = fake_python_panel_service
15- panel = PortPanel (port , "my_panel" , "path/to/script" )
14+ service = fake_python_panel_service
15+ panel = PortPanel (service . port , "my_panel" , "path/to/script" )
1616 panel .connect ()
1717
1818 panel .set_value ("test_id" , "test_value" )
@@ -23,24 +23,24 @@ def test___connected_panel___set_value___gets_same_value(
2323
2424
2525def test___with_panel___set_value___gets_same_value (
26- fake_python_panel_service : tuple [ FakePythonPanelServicer , int ] ,
26+ fake_python_panel_service : FakePythonPanelService ,
2727) -> None :
28- _ , port = fake_python_panel_service
29- with PortPanel (port , "my_panel" , "path/to/script" ) as panel :
28+ service = fake_python_panel_service
29+ with PortPanel (service . port , "my_panel" , "path/to/script" ) as panel :
3030 panel .set_value ("test_id" , "test_value" )
3131
3232 # TODO: AB#3095681 - change asserted value to test_value
3333 assert panel .get_value ("test_id" ) == "placeholder value"
3434
3535
3636def test___first_connect_fails___connect___gets_value (
37- fake_python_panel_service : tuple [ FakePythonPanelServicer , int ] ,
37+ fake_python_panel_service : FakePythonPanelService ,
3838) -> None :
3939 """Test that panel.connect() will automatically retry once."""
40- servicer , port = fake_python_panel_service
40+ service = fake_python_panel_service
4141 # Simulate a failure on the first connect attempt
42- servicer .fail_next_connect ()
43- panel = PortPanel (port , "my_panel" , "path/to/script" )
42+ service . servicer .fail_next_connect ()
43+ panel = PortPanel (service . port , "my_panel" , "path/to/script" )
4444
4545 panel .connect ()
4646
0 commit comments