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

test_bool_or_none_params

parent de4e8803
No related branches found
No related tags found
No related merge requests found
......@@ -91,10 +91,11 @@ def test_catch_non_dataframe(the_dataset: Dataset, param):
@pytest.mark.parametrize(
"param",
["true", "false", "True", "False"],
["true", "false", "True", "False", 1, 0, -1],
)
def test_catch_non_bool(the_dataset: Dataset, param):
"""Tests that the dataframe is preprocessed correctly."""
"""Tests that functions that take bool or None correctly
catch incorrect input data types."""
dataframe = the_dataset.get_dataframe()
columns_set = set(dataframe.columns)
with pytest.raises(ValueError):
......@@ -107,7 +108,16 @@ def test_catch_non_bool(the_dataset: Dataset, param):
[True, False, None],
)
def test_bool_or_none_params(the_dataset: Dataset, param):
"""Tests that the dataframe is preprocessed correctly."""
"""Tests that functions that take bool or None correctly
work as intended.
"""
dataframe = the_dataset.get_dataframe()
columns_set = set(dataframe.columns)
the_dataset.get_category_counts("GAD_T", param)
def test_catch_colname_not_in_df(the_dataset: Dataset):
"""Tests that functions that take colname correctly
catch colnames not in dataset."""
with pytest.raises(KeyError):
the_dataset.get_category_counts("GAAAD_T")
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