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

fixed tests to use string param instead of Pathlib

parent 5d56375f
No related branches found
No related tags found
No related merge requests found
......@@ -12,13 +12,13 @@ this_file_dir = Path(__file__).parent
@pytest.fixture
def the_dataset() -> Dataset:
dataset = Dataset(this_file_dir / "../data/GamingStudy_data.csv")
dataset = Dataset(str(this_file_dir / "../data/GamingStudy_data.csv"))
return dataset
def test_load_Dataset_class():
"""Tests if the dataset is successfully loaded."""
dataset = Dataset(this_file_dir / "../data/GamingStudy_data.csv")
dataset = Dataset(str(this_file_dir / "../data/GamingStudy_data.csv"))
assert type(dataset) == Dataset
assert type(dataset.dataframe) == pd.DataFrame
......@@ -55,5 +55,5 @@ def test_preprocessed_dataframe(the_dataset: Dataset):
def test_get_sorted_columns(the_dataset: Dataset):
"""Tests Dataset.get_sorted_column()."""
sorted_GAD1 = the_dataset.get_sorted_column("GAD1")
sorted_GAD1 = the_dataset.get_sorted_column("GAD_T")
assert sorted_GAD1.iloc[0] <= sorted_GAD1.iloc[-1]
......@@ -9,7 +9,7 @@ this_file_dir = Path(__file__).parent
def test_load_plotter():
"""Tests that the Plotter class can be loaded."""
dataset = Dataset(this_file_dir / "../data/GamingStudy_data.csv")
dataset = Dataset(str(this_file_dir / "../data/GamingStudy_data.csv"))
plotter = Plotter(dataset)
assert type(plotter.df) == pd.DataFrame
assert type(plotter.ds) == Dataset
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