@@ -38,7 +38,8 @@ class Base(Plugin):
38
38
39
39
def options (self , parser , env ):
40
40
super ().options (parser , env = env )
41
- parser .add_option (
41
+ parser .addoption = parser .add_option # Reuse name from pytest parser
42
+ parser .addoption (
42
43
"--env" ,
43
44
action = "store" ,
44
45
dest = "environment" ,
@@ -63,38 +64,38 @@ def options(self, parser, env):
63
64
help = """This option sets a test env from a list of choices.
64
65
Access using "self.env" or "self.environment".""" ,
65
66
)
66
- parser .add_option (
67
+ parser .addoption (
67
68
"--account" ,
68
69
dest = "account" ,
69
70
default = None ,
70
71
help = """This option sets a test account string.
71
72
In tests, use "self.account" to get the value.""" ,
72
73
)
73
- parser .add_option (
74
+ parser .addoption (
74
75
"--data" ,
75
76
dest = "data" ,
76
77
default = None ,
77
78
help = "Extra data to pass to tests from the command line." ,
78
79
)
79
- parser .add_option (
80
+ parser .addoption (
80
81
"--var1" ,
81
82
dest = "var1" ,
82
83
default = None ,
83
84
help = "Extra data to pass to tests from the command line." ,
84
85
)
85
- parser .add_option (
86
+ parser .addoption (
86
87
"--var2" ,
87
88
dest = "var2" ,
88
89
default = None ,
89
90
help = "Extra data to pass to tests from the command line." ,
90
91
)
91
- parser .add_option (
92
+ parser .addoption (
92
93
"--var3" ,
93
94
dest = "var3" ,
94
95
default = None ,
95
96
help = "Extra data to pass to tests from the command line." ,
96
97
)
97
- parser .add_option (
98
+ parser .addoption (
98
99
"--variables" ,
99
100
dest = "variables" ,
100
101
default = None ,
@@ -109,7 +110,7 @@ def options(self, parser, env):
109
110
Access: self.variables["num"]
110
111
----------------------------------------------""" ,
111
112
)
112
- parser .add_option (
113
+ parser .addoption (
113
114
"--settings_file" ,
114
115
"--settings-file" ,
115
116
"--settings" ,
@@ -119,38 +120,38 @@ def options(self, parser, env):
119
120
help = """The file that stores key/value pairs for overriding
120
121
values in the SeleniumBase settings.py file.""" ,
121
122
)
122
- parser .add_option (
123
+ parser .addoption (
123
124
"--log_path" ,
124
125
"--log-path" ,
125
126
dest = "log_path" ,
126
127
default = "latest_logs/" ,
127
128
help = """(DEPRECATED) - This field is NOT EDITABLE anymore.
128
129
Log files are saved to the "latest_logs/" folder.""" ,
129
130
)
130
- parser .add_option (
131
+ parser .addoption (
131
132
"--archive_logs" ,
132
133
"--archive-logs" ,
133
134
action = "store_true" ,
134
135
dest = "archive_logs" ,
135
136
default = False ,
136
137
help = "Archive old log files instead of deleting them." ,
137
138
)
138
- parser .add_option (
139
+ parser .addoption (
139
140
"--archive_downloads" ,
140
141
"--archive-downloads" ,
141
142
action = "store_true" ,
142
143
dest = "archive_downloads" ,
143
144
default = False ,
144
145
help = "Archive old downloads instead of deleting them." ,
145
146
)
146
- parser .add_option (
147
+ parser .addoption (
147
148
"--report" ,
148
149
action = "store_true" ,
149
150
dest = "report" ,
150
151
default = False ,
151
152
help = "Create a fancy report at the end of the test suite." ,
152
153
)
153
- parser .add_option (
154
+ parser .addoption (
154
155
"--show_report" ,
155
156
"--show-report" ,
156
157
action = "store_true" ,
@@ -167,7 +168,7 @@ def options(self, parser, env):
167
168
found_timeout_arg = True
168
169
if found_processes_arg :
169
170
print ("* WARNING: Don't use multi-threading with nosetests! *" )
170
- parser .add_option (
171
+ parser .addoption (
171
172
"--processes" ,
172
173
dest = "processes" ,
173
174
default = 0 ,
@@ -177,7 +178,7 @@ def options(self, parser, env):
177
178
print ("\n WARNING: Don't use --timeout=s from pytest-timeout!" )
178
179
print (" It's not thread-safe for WebDriver processes!" )
179
180
print (" Use --time-limit=s from SeleniumBase instead!\n " )
180
- parser .add_option (
181
+ parser .addoption (
181
182
"--timeout" ,
182
183
dest = "timeout" ,
183
184
default = 0 ,
0 commit comments