summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/contrib/admin/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/django/contrib/admin/tests.py b/django/contrib/admin/tests.py
index c99488cd41..30d63e4486 100644
--- a/django/contrib/admin/tests.py
+++ b/django/contrib/admin/tests.py
@@ -1,3 +1,5 @@
+import os
+
from django.test import LiveServerTestCase
from django.utils.module_loading import import_by_path
from django.utils.unittest import SkipTest
@@ -8,6 +10,8 @@ class AdminSeleniumWebDriverTestCase(LiveServerTestCase):
@classmethod
def setUpClass(cls):
+ if os.environ.get('DJANGO_SKIP_SELENIUM_TESTS', False):
+ raise SkipTest('Selenium tests skipped by explicit request')
try:
cls.selenium = import_by_path(cls.webdriver_class)()
except Exception as e: