def test_yaml_to_dict_file_empty(): assert ConfigParser.yaml_to_dict(yaml_file=FILE_EMPTY) == {}
def test_yaml_to_dict_file_txt(): with pytest.raises(TypeError): ConfigParser.yaml_to_dict(yaml_file=FILE_TXT)
def test_yaml_to_dict_file_not_found(): with pytest.raises(FileNotFoundError): ConfigParser.yaml_to_dict(yaml_file=FILE_UNAVAILABLE)
def test_yaml_to_dict_file_not_yaml(): with pytest.raises(ParserError): ConfigParser.yaml_to_dict(yaml_file=FILE_NOT_YAML)
def test_yaml_to_dict_file_ok(): d = ConfigParser.yaml_to_dict(yaml_file=FILE_OK) assert type(d) is dict assert bool(d) is True