I'm wondering how get nose.run() twice using different configuration in a python script
- I have a nosetest (un开发者_如何学Pythonit test) where it needs to be run on 2 types of browsers using webdriver .
- The print command below will show the browser is assigned to browser 1 and 2 respectively.
- However nose.run always run using browser2 variable twice instead of running browser1 and then browser 2.
parser = SafeConfigParser()
parser.read('config.ini')
browser = parser.get('Selenium_Config','browser1')
print browser
nose.run()
browser = parser.get('Selenium_Config','browser2')
print browser
nose.run()
精彩评论