def get_test_config( self, data_dir="", num_browsers=NUM_BROWSERS, display_mode="headless" ): """Load and return the default test parameters.""" if not data_dir: data_dir = self.tmpdir manager_params = ManagerParams(num_browsers=num_browsers) browser_params = [BrowserParams() for _ in range(num_browsers)] manager_params.data_directory = data_dir manager_params.log_directory = data_dir manager_params.num_browsers = num_browsers for i in range(num_browsers): browser_params[i].display_mode = display_mode manager_params.database_name = join( manager_params.data_directory, manager_params.database_name ) return manager_params, browser_params
def get_test_config( self, data_dir: Optional[Path] = None, num_browsers: int = NUM_BROWSERS, display_mode: str = "headless", ) -> Tuple[ManagerParams, List[BrowserParams]]: """Load and return the default test parameters.""" if not data_dir: data_dir = self.tmpdir assert data_dir is not None # Mypy doesn't understand this without help manager_params = ManagerParams(num_browsers=num_browsers) browser_params = [BrowserParams() for _ in range(num_browsers)] manager_params.log_path = data_dir / "openwpm.log" manager_params.num_browsers = num_browsers for i in range(num_browsers): browser_params[i].display_mode = display_mode return manager_params, browser_params