File tree 2 files changed +5
-6
lines changed
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ def agent(pytestconfig):
45
45
def base_url ():
46
46
return "http://127.0.0.1:8991"
47
47
48
- @pytest .fixture (scope = "session " )
49
- def socketio (base_url , data = "" ):
48
+ @pytest .fixture (scope = "function " )
49
+ def socketio (base_url , agent ):
50
50
sio = io .Client ()
51
51
sio .connect (base_url )
52
52
yield sio
Original file line number Diff line number Diff line change 1
- import socketio
2
1
import time
3
2
4
- def test_ws_connection (agent , socketio ):
3
+ def test_ws_connection (socketio ):
5
4
print ('my sid is' , socketio .sid )
6
5
assert socketio .sid is not None
7
6
8
- def test_list (agent , socketio ):
7
+ def test_list (socketio ):
9
8
socketio .on ('message' , message_handler )
10
9
socketio .emit ('command' , 'list' )
11
10
time .sleep (.1 )
12
11
13
- def test__open_serial_default (agent , socketio ):
12
+ def test__open_serial_default (socketio ):
14
13
socketio .on ('message' , message_handler )
15
14
socketio .emit ('command' , 'open /dev/ttyACM0 9600' )
16
15
time .sleep (.1 )
You can’t perform that action at this time.
0 commit comments