def test_dict_to_yaml_invalid_object(): params = {Parameters(): Parameters()} with pytest.raises(RepresenterError): ConfigParser.dict_to_yaml( d=params, yaml_file=FILE_OUT, )
def test_dict_to_yaml_wrong_type_yaml_file(): params = Parameters().to_dict() with pytest.raises(TypeError): ConfigParser.dict_to_yaml( d=params, yaml_file=LIST, )
def test_dict_to_yaml_file_unavailable(): params = Parameters().to_dict() ret = ConfigParser.dict_to_yaml( d=params, yaml_file=FILE_UNAVAILABLE, ) assert ret is None
def test_dict_to_yaml_file_ok(): params = Parameters().to_dict() ret = ConfigParser.dict_to_yaml( d=params, yaml_file=FILE_OUT, ) assert ret is None
def test_dict_to_yaml_wrong_type_d(): with pytest.raises(TypeError): ConfigParser.dict_to_yaml( d=LIST, yaml_file=FILE_OUT, )