From 1cd2f51eb43f9ed043982770b4efd5f28f53f302 Mon Sep 17 00:00:00 2001 From: Zbigniew Siciarz Date: Sat, 23 Feb 2013 17:10:48 +0100 Subject: Added test runner option to skip Selenium tests (#19854). --- django/contrib/admin/tests.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'django') 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: -- cgit v1.3