def test_raises_warning_if_file_extension_is_not_cif(self): cif_filepath = "tests/functional/static/valid_cifs/non_cif_extension.txt" # test for warning on validating cif with pytest.warns(UserWarning): validate_cif(cif_filepath) # test for warning on loading cif with pytest.warns(UserWarning): load_cif(cif_filepath)
def test_loading_cif_from_invalid_filepath_raises_exception(self): cif_filepath = "/no/cif/file/here" # test for exception on validating cif with pytest.raises(FileNotFoundError): validate_cif(cif_filepath) # test for exception on loading cif with pytest.raises(FileNotFoundError): load_cif(cif_filepath)