def test_locate_file_invalid_path(): """ Test that `config.locate_file` raises an error for paths that do not exist. """ _locate_file('test/does_not_exist.cfg', _my_dir)
def test_locate_file_valid_paths3(): """ Test that `config.locate_file` works with relative/absolute paths. """ config_abs_path = join(_my_dir, 'configs', 'test_config_parsing_relative_path3.cfg') config_rel_path = 'configs/test_config_parsing_relative_path3.cfg' open(config_abs_path, 'w').close() eq_(_locate_file(config_abs_path, _my_dir), _locate_file(config_rel_path, _my_dir))