Skip to content

Commit 4a81457

Browse files
committed
Update plugin descriptions shown by "pytest --help"
1 parent 20fddd0 commit 4a81457

File tree

3 files changed

+26
-16
lines changed

3 files changed

+26
-16
lines changed

seleniumbase/plugins/base_plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ def options(self, parser, env):
7575
'--log_path', '--log-path',
7676
dest='log_path',
7777
default='latest_logs/',
78-
help="""Log files are saved to the "latest_logs/" folder.
79-
(This field is NOT EDITABLE anymore!)""")
78+
help="""(DEPRECATED) - This field is NOT EDITABLE anymore.
79+
Log files are saved to the "latest_logs/" folder.""")
8080
parser.add_option(
8181
'--archive_logs', '--archive-logs',
8282
action="store_true",

seleniumbase/plugins/pytest_plugin.py

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ def pytest_addoption(parser):
143143
constants.Environment.TEST
144144
),
145145
default=constants.Environment.TEST,
146-
help="The environment to run the tests in.")
146+
help="""This option is used for setting the test env.
147+
In tests, use "self.environment" to get the env.""")
147148
parser.addoption('--data',
148149
dest='data',
149150
default=None,
@@ -191,18 +192,19 @@ def pytest_addoption(parser):
191192
action="store_true",
192193
dest='with_testing_base',
193194
default=True,
194-
help="""Use to save logs and screenshots when tests fail.
195+
help="""(DEPRECATED) - This option is always enabled now.
196+
Use for saving logs & screenshots when tests fail.
195197
The following options are now active by default
196-
with --with-testing_base (which is on by default):
198+
with --with-testing_base (which is always on now):
197199
--with-screen_shots ,
198200
--with-basic_test_info ,
199201
--with-page_source
200202
""")
201203
parser.addoption('--log_path', '--log-path',
202204
dest='log_path',
203205
default='latest_logs/',
204-
help="""Log files are saved to the "latest_logs/" folder.
205-
(This field is NOT EDITABLE anymore!)""")
206+
help="""(DEPRECATED) - This value is NOT EDITABLE anymore.
207+
Log files are saved to the "latest_logs/" folder.""")
206208
parser.addoption('--archive_logs', '--archive-logs',
207209
action="store_true",
208210
dest='archive_logs',
@@ -213,7 +215,7 @@ def pytest_addoption(parser):
213215
dest='with_db_reporting',
214216
default=False,
215217
help="Use to record test data in the MySQL database.")
216-
parser.addoption('--database_env', '--database-env',
218+
parser.addoption('--database_env',
217219
action='store',
218220
dest='database_env',
219221
choices=(
@@ -236,19 +238,24 @@ def pytest_addoption(parser):
236238
action="store_true",
237239
dest='with_screen_shots',
238240
default=False,
239-
help="""Use to save screenshots on test failure.
241+
help="""(DEPRECATED) - Screenshots are always saved now.
242+
This option saves screenshots during test failures.
243+
Screenshots are saved in the "latest_logs/" folder.
240244
(Automatically on when using --with-testing_base)""")
241245
parser.addoption('--with-basic_test_info', '--with-basic-test-info',
242246
action="store_true",
243247
dest='with_basic_test_info',
244248
default=False,
245-
help="""Use to save basic test info on test failure.
249+
help="""(DEPRECATED) - Info files are always saved now.
250+
This option saves basic test info on test failures.
251+
These files are saved in the "latest_logs/" folder.
246252
(Automatically on when using --with-testing_base)""")
247253
parser.addoption('--with-page_source', '--with-page-source',
248254
action="store_true",
249255
dest='with_page_source',
250256
default=False,
251-
help="""Use to save page source on test failure.
257+
help="""(DEPRECATED) - Page source is saved by default.
258+
This option saves page source files on test failures.
252259
(Automatically on when using --with-testing_base)""")
253260
parser.addoption('--server',
254261
action='store',
@@ -447,14 +454,16 @@ def pytest_addoption(parser):
447454
action="store_true",
448455
dest='no_sandbox',
449456
default=False,
450-
help="""Using this enables the "No Sandbox" feature.
457+
help="""(DEPRECATED) - "--no-sandbox" is always used now.
458+
Using this enables the "No Sandbox" feature.
451459
(This setting is now always enabled by default.)""")
452460
parser.addoption('--disable_gpu', '--disable-gpu',
453461
action="store_true",
454462
dest='disable_gpu',
455463
default=False,
456-
help="""Using this enables the "Disable GPU" feature.
457-
(This setting is now always enabled by default.)""")
464+
help="""(DEPRECATED) - GPU is disabled if no swiftshader.
465+
Using this enables the "Disable GPU" feature.
466+
(GPU is disabled by default if swiftshader off.)""")
458467
parser.addoption('--remote_debug', '--remote-debug',
459468
action="store_true",
460469
dest='remote_debug',

seleniumbase/plugins/selenium_plugin.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,9 @@ def options(self, parser, env):
370370
action="store_true",
371371
dest='save_screenshot',
372372
default=False,
373-
help="""Take a screenshot on last page after the last step
374-
of the test. (Added to the "latest_logs" folder.)""")
373+
help="""(DEPRECATED) - Screenshots are enabled by default now.
374+
This option saves screenshots during test failures.
375+
(Added to the "latest_logs/" folder.)""")
375376
parser.add_option(
376377
'--visual_baseline', '--visual-baseline',
377378
action='store_true',

0 commit comments

Comments
 (0)