Python unittest passing arguments to parent test class
问题 I have a parent test class named as basetestcase() This is inherited by all the test classes class BaseTestCase(unittest.TestCase): driver = None browser = read from command line operatingSystem = read from command line url = read from command line @classmethod def setUpClass(cls): """ SetUp to initialize webdriver session, pages and other needed objects Returns: None """ # Get webdriver instance # Browser should be read from the arguments if browser == "iexplorer": cls.driver = webdriver.Ie(