Beispiel #1
0
def test_read_config_files_single_config_invalid():
    with pytest.raises(ParserError):
        ConfigParser.read_config_files(FILE_NOT_YAML)
Beispiel #2
0
def test_read_config_files_multi_config_partly_invalid():
    with pytest.raises(ParserError):
        ConfigParser.read_config_files(FILE_OK, FILE_NOT_YAML)
Beispiel #3
0
def test_read_config_files_multi_config_partly_unavailable():
    with pytest.raises(FileNotFoundError):
        ConfigParser.read_config_files(FILE_OK, FILE_UNAVAILABLE)
Beispiel #4
0
def test_read_config_files_single_config_unavailable():
    with pytest.raises(FileNotFoundError):
        ConfigParser.read_config_files(FILE_UNAVAILABLE)
Beispiel #5
0
def test_read_config_files_multi_config():
    res = ConfigParser.read_config_files(FILE_OK, FILE_OK)
    assert type(res) is dict
Beispiel #6
0
def test_read_config_files_single_config():
    res = ConfigParser.read_config_files(FILE_OK)
    assert type(res) is dict
Beispiel #7
0
def test_read_config_files_no_args():
    res = ConfigParser.read_config_files()
    assert res == {}