Skip to content
Snippets Groups Projects
Commit 964dddc9 authored by Sortofamudkip's avatar Sortofamudkip
Browse files

test_incorrectly_load_Dataset_class

parent 54755492
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,17 @@ def test_load_Dataset_class():
assert type(dataset.dataframe) == pd.DataFrame
def test_incorrectly_load_Dataset_class():
with pytest.raises(ValueError):
dataset = Dataset(1234) # not a string
with pytest.raises(OSError):
dataset = Dataset("aaa.bcd") # doesn't end with .csv
with pytest.raises(FileNotFoundError):
dataset = Dataset(
str(this_file_dir / "./data/GamingStudy_data.csv")
) # wrong file location
def test_get_dataframe(the_dataset: Dataset):
"""Tests Dataset.get_dataframe()."""
assert type(the_dataset.get_dataframe()) == pd.DataFrame
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment