def test_parse_ini_config_with_cli_overrides(mock_ini_file): """Input from the CLI will override the values from the ini file.""" override = ["--blacklist", "aa", "-m", "s", "-r", "314", "--debug"] expected = [ "--blacklist", "aa", "--mode", "s", "--rseed", "314", "--debug", "--exclude", "mutatest/__init__.py", "--exclude", "mutatest/_devtools.py", "--testcmds", "pytest -m 'not slow'", ] config = cli.read_ini_config(mock_ini_file.ini_file) parser = cli.cli_parser() result = cli.parse_ini_config_with_cli(parser, config, override) assert result == expected
def test_parse_ini_config_with_cli_empty(mock_ini_file): """With default empty args the ini file should be the only values""" config = cli.read_ini_config(mock_ini_file.ini_file) parser = cli.cli_parser() result = cli.parse_ini_config_with_cli(parser, config, []) assert result == mock_ini_file.args