Fixed error handling in 3c5775d36f
for non-operational webdrivers.
This commit is contained in:
parent
3c5775d36f
commit
2fa0dd73b1
|
@ -23,11 +23,15 @@ class AdminSeleniumWebDriverTestCase(StaticLiveServerCase):
|
||||||
raise SkipTest('Selenium tests not requested')
|
raise SkipTest('Selenium tests not requested')
|
||||||
try:
|
try:
|
||||||
webdriver_class = import_by_path(cls.webdriver_class)
|
webdriver_class = import_by_path(cls.webdriver_class)
|
||||||
except Exception as e:
|
except ImportError as e:
|
||||||
raise SkipTest('Selenium webdriver "%s" not installed or not '
|
raise SkipTest('Selenium webdriver "%s" not installed: %s'
|
||||||
'operational: %s' % (cls.webdriver_class, str(e)))
|
% (cls.webdriver_class, str(e)))
|
||||||
super(AdminSeleniumWebDriverTestCase, cls).setUpClass()
|
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
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
|
|
Loading…
Reference in New Issue