def setup(self): self.config = get_config() self.action_space = ActionSpace(get_push_groups()) self.client_environment = get_random_client_environment() self.policy = Policy(self.action_space) applied = True while applied: applied = self.policy.apply_action(self.action_space.sample())
def test_get_chrome_command(): user_data_dir = "/tmp/chrome_data" url = "http://example.com" flags = get_chrome_flags(user_data_dir) config = get_config() chrome_cmd = get_chrome_command(url, flags, config) assert config.chrome_bin == chrome_cmd[0] assert flags == chrome_cmd[1:-1] assert url == chrome_cmd[-1]
def setup(self): self.config = get_config()
def get_analyzer(self, reward_func: int = 0): return Analyzer(get_config(), reward_func, self.client_environment)
def setup(self): self.config = get_config() self.policy = Policy(ActionSpace(self.config.env_config.push_groups)) self.client_environment = get_random_client_environment()
def setup(self): self.config = get_config() self.har = har_from_json(get_har_json())