Skip to content
Browse files

CBQE-807: remove unittest.skipIf feature from pytests

Change-Id: I90280d5db65282515dd3ab3127400db53a9a7ac5
Reviewed-on: http://review.couchbase.org/22591
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Iryna Mironava <irynamironava@yandex.ru>
  • Loading branch information...
1 parent 0694741 commit 457deffe35033bc5c8601ba3bffa40ba5f3f4a5c @andreibaranouski andreibaranouski committed Nov 16, 2012
Showing with 6 additions and 14 deletions.
  1. +2 −3 pytests/uibasetest.py
  2. +2 −3 pytests/viewmergetests.py
  3. +2 −8 pytests/viewquerytests.py
View
5 pytests/uibasetest.py
@@ -22,7 +22,6 @@
class BaseUITestCase(unittest.TestCase):
- skip_setup_failed = False
# selenium thread
def _start_selenium(self):
@@ -70,7 +69,6 @@ def _is_selenium_running(self):
return True
return False
- @unittest.skipIf(skip_setup_failed, "setup was failed")
def setUp(self):
try:
self.log = logger.Logger.get_logger()
@@ -109,7 +107,8 @@ def setUp(self):
self.servers[0].port))
self.driver.maximize_window()
except Exception as ex:
- skip_setup_failed = True
+ self.input.test_params["stop-on-failure"] = True
+ self.log.error("SETUP WAS FAILED. ALL TESTS WILL BE SKIPPED")
self.fail(ex)
@staticmethod
View
5 pytests/viewmergetests.py
@@ -20,9 +20,7 @@
class ViewMergingTests(BaseTestCase):
- skip_setup_failed = False
- @unittest.skipIf(skip_setup_failed, "setup was failed")
def setUp(self):
try:
if 'first_case' not in TestInputSingleton.input.test_params:
@@ -45,7 +43,8 @@ def setUp(self):
if 'first_case' in TestInputSingleton.input.test_params:
self.create_ddocs()
except Exception as ex:
- skip_setup_failed = True
+ self.input.test_params["stop-on-failure"] = True
+ self.log.error("SETUP WAS FAILED. ALL TESTS WILL BE SKIPPED")
self.fail(ex)
def tearDown(self):
View
10 pytests/viewquerytests.py
@@ -41,9 +41,6 @@ def stopped(self):
return self._stop.isSet()
class ViewQueryTests(unittest.TestCase):
- skip_setup_failed = False
-
- @unittest.skipIf(skip_setup_failed, "setup was failed")
def setUp(self):
try:
ViewBaseTests.common_setUp(self)
@@ -64,11 +61,8 @@ def setUp(self):
else:
ViewBaseTests._create_multiple_buckets(self, replica=self.replica)
except Exception as ex:
- skip_setup_failed = True
- try:
- self.tearDown()
- except:
- pass
+ self.input.test_params["stop-on-failure"] = True
+ self.log.error("SETUP WAS FAILED. ALL TESTS WILL BE SKIPPED")
self.fail(ex)
def tearDown(self):

0 comments on commit 457deff

Please sign in to comment.
Something went wrong with that request. Please try again.