mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Added test runner option to skip Selenium tests (#19854).
This commit is contained in:
@@ -301,7 +301,12 @@ if __name__ == "__main__":
|
||||
'--liveserver', action='store', dest='liveserver', default=None,
|
||||
help='Overrides the default address where the live server (used with '
|
||||
'LiveServerTestCase) is expected to run from. The default value '
|
||||
'is localhost:8081.'),
|
||||
'is localhost:8081.')
|
||||
parser.add_option(
|
||||
'--skip-selenium', action='store_true', dest='skip_selenium',
|
||||
default=False,
|
||||
help='Skip running Selenium tests even it Selenium itself is '
|
||||
'installed. By default these tests are not skipped.')
|
||||
options, args = parser.parse_args()
|
||||
if options.settings:
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = options.settings
|
||||
@@ -314,6 +319,9 @@ if __name__ == "__main__":
|
||||
if options.liveserver is not None:
|
||||
os.environ['DJANGO_LIVE_TEST_SERVER_ADDRESS'] = options.liveserver
|
||||
|
||||
if options.skip_selenium:
|
||||
os.environ['DJANGO_SKIP_SELENIUM_TESTS'] = '1'
|
||||
|
||||
if options.bisect:
|
||||
bisect_tests(options.bisect, options, args)
|
||||
elif options.pair:
|
||||
|
||||
Reference in New Issue
Block a user