33from roku import scripting
44
55
6- SCRIPT_PATH = ' roku/tests/scripts/testscript.txt'
6+ SCRIPT_PATH = " roku/tests/scripts/testscript.txt"
77
88
99def test_loading ():
@@ -12,8 +12,8 @@ def test_loading():
1212
1313def test_loading_params ():
1414 params = {
15- ' avar' : ' here' ,
16- ' notavar' : ' missing' ,
15+ " avar" : " here" ,
16+ " notavar" : " missing" ,
1717 }
1818 content = scripting .load_script (SCRIPT_PATH , params = params , raw = True )
1919 assert "literal:here" in content
@@ -22,48 +22,48 @@ def test_loading_params():
2222
2323def test_loading_notfound ():
2424 with pytest .raises (ValueError ):
25- scripting .load_script (' thisisnotarealscript.txt' )
25+ scripting .load_script (" thisisnotarealscript.txt" )
2626
2727
2828def test_parse_command_only ():
29- content = (' home' ,)
29+ content = (" home" ,)
3030 script = scripting .parse_script (content )
3131 command = script [0 ]
32- assert command == scripting .Command (' home' , None , 1 , None )
32+ assert command == scripting .Command (" home" , None , 1 , None )
3333
3434
3535def test_parse_command_param ():
36- content = (' literal:barbecue' ,)
36+ content = (" literal:barbecue" ,)
3737 script = scripting .parse_script (content )
3838 command = script [0 ]
39- assert command == scripting .Command (' literal' , ' barbecue' , 1 , None )
39+ assert command == scripting .Command (" literal" , " barbecue" , 1 , None )
4040
4141
4242def test_parse_command_count ():
43- content = (' left@10' ,)
43+ content = (" left@10" ,)
4444 script = scripting .parse_script (content )
4545 command = script [0 ]
46- assert command == scripting .Command (' left' , None , 10 , None )
46+ assert command == scripting .Command (" left" , None , 10 , None )
4747
4848
4949def test_parse_command_sleep ():
50- content = (' left*2' ,)
50+ content = (" left*2" ,)
5151 script = scripting .parse_script (content )
5252 command = script [0 ]
53- assert command == scripting .Command (' left' , None , 1 , 2.0 )
53+ assert command == scripting .Command (" left" , None , 1 , 2.0 )
5454
5555
5656def test_parse_command_all ():
57- content = (' literal:barbecue@3*5.1' ,)
57+ content = (" literal:barbecue@3*5.1" ,)
5858 script = scripting .parse_script (content )
5959 command = script [0 ]
60- assert command == scripting .Command (' literal' , ' barbecue' , 3 , 5.1 )
60+ assert command == scripting .Command (" literal" , " barbecue" , 3 , 5.1 )
6161
6262
6363def test_run_script (roku ):
64- content = (' home' , ' literal:x' )
64+ content = (" home" , " literal:x" )
6565 script = scripting .parse_script (content )
6666 scripting .run_script (roku , script )
6767 calls = roku .calls ()
68- assert ' keypress/Home' in calls [0 ][1 ]
69- assert ' keypress/Lit_x' in calls [1 ][1 ]
68+ assert " keypress/Home" in calls [0 ][1 ]
69+ assert " keypress/Lit_x" in calls [1 ][1 ]
0 commit comments