def tearDown(self): "This tear down will close the current allocated webdriver" # do_and_ignore() is a handle wrapper that let's you run a statement # and not care if it errors or not. This is helpful for tearDown # routines where the success/failure is not part of the test result. do_and_ignore(lambda: WTF_WEBDRIVER_MANAGER.close_driver())
def test_do_and_ignore(self): self.__did_call_function = False def erroneous_func(): self.__did_call_function = True raise RuntimeError("IGNORE ME") do_and_ignore(lambda: erroneous_func()) self.assertTrue(self.__did_call_function)
def tearDown(self): #tear down any webdrivers we create. do_and_ignore(lambda: WTF_WEBDRIVER_MANAGER.close_driver())
def tearDown(self): do_and_ignore(lambda: WTF_WEBDRIVER_MANAGER.close_driver(self.driver))
def __exit__(self, type_, value, traceback): # Stop standby on exit do_and_ignore(lambda: self.stop())
def __del__(self): do_and_ignore(lambda: self.stop()) self._thread = None
def teardown(self): do_and_ignore(lambda: WTF_WEBDRIVER_MANAGER.close_driver())
def tearDown(self): # tear down any webdrivers we create. do_and_ignore(lambda: WTF_WEBDRIVER_MANAGER.close_driver())