File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ def agent(pytestconfig):
4545def base_url ():
4646 return "http://127.0.0.1:8991"
4747
48- @pytest .fixture (scope = "session " )
49- def socketio (base_url , data = "" ):
48+ @pytest .fixture (scope = "function " )
49+ def socketio (base_url , agent ):
5050 sio = io .Client ()
5151 sio .connect (base_url )
5252 yield sio
Original file line number Diff line number Diff line change 1- import socketio
21import time
32
4- def test_ws_connection (agent , socketio ):
3+ def test_ws_connection (socketio ):
54 print ('my sid is' , socketio .sid )
65 assert socketio .sid is not None
76
8- def test_list (agent , socketio ):
7+ def test_list (socketio ):
98 socketio .on ('message' , message_handler )
109 socketio .emit ('command' , 'list' )
1110 time .sleep (.1 )
1211
13- def test__open_serial_default (agent , socketio ):
12+ def test__open_serial_default (socketio ):
1413 socketio .on ('message' , message_handler )
1514 socketio .emit ('command' , 'open /dev/ttyACM0 9600' )
1615 time .sleep (.1 )
You can’t perform that action at this time.
0 commit comments