コード例 #1
0
def test_discover_config_file_env_no_exception():
    test_config = default_config
    with open(os.path.join(temp_dir, "augur.config.json"), "w") as f:
        pass
    config_object = AugurConfig(temp_dir, test_config)
    assert config_object.discover_config_file() == os.path.join(
        temp_dir, "augur.config.json")
コード例 #2
0
def test_discover_config_file_env_exception():
    os.environ['AUGUR_CONFIG_FILE'] = os.path.join(temp_dir,
                                                   "augur.config.json")
    test_config = default_config
    with pytest.raises(FileNotFoundError):
        config_object = AugurConfig(temp_dir, test_config)
        assert config_object.discover_config_file()