Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed error handling in 3c5775d for non-operational webdrivers.

  • Loading branch information...
commit 2fa0dd73b18f55d0fdd1c1d54b1d18031bfcf1ed 1 parent 3c5775d
@apollo13 apollo13 authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 django/contrib/admin/tests.py
View
12 django/contrib/admin/tests.py
@@ -23,11 +23,15 @@ def setUpClass(cls):
raise SkipTest('Selenium tests not requested')
try:
webdriver_class = import_by_path(cls.webdriver_class)
- except Exception as e:
- raise SkipTest('Selenium webdriver "%s" not installed or not '
- 'operational: %s' % (cls.webdriver_class, str(e)))
+ except ImportError as e:
+ raise SkipTest('Selenium webdriver "%s" not installed: %s'
+ % (cls.webdriver_class, str(e)))
super(AdminSeleniumWebDriverTestCase, cls).setUpClass()
- cls.selenium = webdriver_class()
+ try:
+ cls.selenium = webdriver_class()
+ except Exception as e:
+ raise SkipTest('Selenium webdriver "%s" not operational: %s'
+ % (cls.webdriver_class, str(e)))
@classmethod
def tearDownClass(cls):
Please sign in to comment.
Something went wrong with that request. Please try again.