def configure(self, options, conf): ''' Configure the plug-in. ''' # Call super super(SeleniumDriverPlugin, self).configure(options, conf) # Check if enabled if self.enabled: # Check if an environment is provided if not options.env: # Not provided, raise raise ValueError('please provide a driver environment') # Get the environment self.env = DriverConfig(all_config_files(options, conf)).getenv(options.env)
def __init__(self, test_labels, options): ''' Store the environment configuration. ''' # Call super super(Task, self).__init__(test_labels, options) # Get the environment selenium_driver = options.get('selenium_driver') # Check if an environment is provided if not selenium_driver: # Not provided, raise raise ValueError('please provide a driver environment with the --selenium-driver option') # Get the global environments variable containing the SELENIUM environment global env # Store the environment env = DriverConfig(all_config_files(options)).getenv(selenium_driver)