@@ -47,44 +47,43 @@ def pytest_addoption(parser):
47
47
choices = drivers ,
48
48
dest = "drivers" ,
49
49
metavar = "DRIVER" ,
50
- help = "driver to run tests against ({})" .format (", " .join (drivers )),
50
+ help = "Driver to run tests against ({})" .format (", " .join (drivers )),
51
51
)
52
52
parser .addoption (
53
53
"--browser-binary" ,
54
54
action = "store" ,
55
55
dest = "binary" ,
56
- help = "location of the browser binary" ,
56
+ help = "Location of the browser binary" ,
57
57
)
58
58
parser .addoption (
59
59
"--driver-binary" ,
60
60
action = "store" ,
61
61
dest = "executable" ,
62
- help = "location of the service executable binary" ,
62
+ help = "Location of the service executable binary" ,
63
63
)
64
64
parser .addoption (
65
65
"--browser-args" ,
66
66
action = "store" ,
67
67
dest = "args" ,
68
- help = "arguments to start the browser with" ,
68
+ help = "Arguments to start the browser with" ,
69
69
)
70
70
parser .addoption (
71
71
"--headless" ,
72
- action = "store " ,
72
+ action = "store_true " ,
73
73
dest = "headless" ,
74
- help = "Allow tests to run in headless" ,
74
+ help = "Run tests in headless mode " ,
75
75
)
76
76
parser .addoption (
77
77
"--use-lan-ip" ,
78
78
action = "store_true" ,
79
79
dest = "use_lan_ip" ,
80
- help = "Whether to start test server with lan ip instead of localhost" ,
80
+ help = "Start test server with lan ip instead of localhost" ,
81
81
)
82
82
parser .addoption (
83
83
"--bidi" ,
84
- action = "store " ,
84
+ action = "store_true " ,
85
85
dest = "bidi" ,
86
- metavar = "BIDI" ,
87
- help = "Whether to enable BiDi support" ,
86
+ help = "Enable BiDi support" ,
88
87
)
89
88
90
89
@@ -179,7 +178,7 @@ def fin():
179
178
# and doesn't seems to be stable enough, causing the flakiness of the
180
179
# subsequent tests.
181
180
# Remove this when BiDi implementation and API is stable.
182
- if bool ( request .config .option .bidi ) :
181
+ if request .config .option .bidi :
183
182
184
183
def fin ():
185
184
global driver_instance
@@ -196,8 +195,8 @@ def fin():
196
195
def get_options (driver_class , config ):
197
196
browser_path = config .option .binary
198
197
browser_args = config .option .args
199
- headless = bool ( config .option .headless )
200
- bidi = bool ( config .option .bidi )
198
+ headless = config .option .headless
199
+ bidi = config .option .bidi
201
200
options = None
202
201
203
202
if browser_path or browser_args :
0 commit comments