You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Check that the `moocore.read_datasets()` functions fails correctly after a bad file name is input."""
55
-
withpytest.raises(Exception) asexpt:
55
+
withpytest.raises(
56
+
FileNotFoundError, match=r"file 'nonexistent_file.txt' not found"
57
+
):
56
58
moocore.read_datasets("nonexistent_file.txt")
57
59
58
-
assertstr(expt.value) =="file 'nonexistent_file.txt' not found"
59
-
assertexpt.typeisFileNotFoundError
60
-
61
60
62
61
deftest_read_datasets_errorcode(test_datapath):
63
62
"""Checks that an exception is raised when `read_datasets()` returns an error code, as well as checking specific error types from the `ReadDatasetsError` type."""
0 commit comments