I'm thinking about switching from our current testing framework nose w/ nose-testconfig to py.test. Any suggestion how to overwrite the following code specifically setup/teardown below using pytest fixtures
class BaseTestCase(unittest.TestCase, Navigation):
@classmethod
def setUpClass(cls):
browser = Browser.getDriver((config['browser']).lower())
cls.driver = EventFiringWebDriver(browser, MyListener())
cls.driver.implicitly_wait(10)
cls.driver.maximize_window()
try:
cls.driver.get(config['url'])
except KeyError:
cls.driver.get(DEV_ENV_URL)
def run(self, result=None):
super(BaseTestCase, self).run(MyTestResult(result, self))
@classmethod
def tearDownClass(cls):
cls.driver.quit()
I'd like to be able to pass command line arguments i.e. url, browser, debug etc.