def test_parse_options_all_valid(self, all_valid_params: OptsArgs): # Test `_parse_options` with all valid params specidied expected: Params = { 'o': os.path.join(os.getcwd(), 'output-dir'), 'i': 23, 'a': 125 } par._parse_options(all_valid_params)
def test_parse_options_k_valid(self, params_k_valid: OptsArgs): # Test `_parse_options` with valid `k` specified expected: Params = { 'o': os.path.join(os.getcwd(), 'output-dir'), 'i': 127, 'a': 127 } par._parse_options(params_k_valid)
def test_parse_options_defaults(self, default_params: OptsArgs): # Test `_parse_options` setting default options expected: Params = { 'o': os.path.join(os.getcwd(), 'combinator-result'), 'i': 21, 'a': 127 } par._parse_options(default_params)
def test_parse_options_k_nonint(self, params_k_nonint: OptsArgs): # Test `_parse_options` with `k` is not int with pytest.raises(SystemExit): par._parse_options(params_k_nonint)
def test_parse_options_k_lqe_zero(self, params_k_zero: OptsArgs, params_k_negative: OptsArgs): # Test `_parse_options` with `maxk` less that or equal to zero for fixture in (params_k_zero, params_k_negative): with pytest.raises(SystemExit): par._parse_options(fixture)