def test_my_dropna_normal(): '''Test normal dataframe''' d1_test = miniTidyPy.my_dropna(input_df) assert d1_test.equals(output_df), "normal dataframe, rows with NAs removed"
def test_my_dropna_wrong_input(): '''When the input data is not a dataframe, return error message''' # input is not a dataframe, should return None and display error message with pytest.raises(TypeError): miniTidyPy.my_dropna([1, 2, 3])
def test_my_dropna_empty(): '''Test empty dataframe''' d1_test = miniTidyPy.my_dropna(empty_df) assert d1_test.equals(empty_df), "empty dataframe, output with empty dataframe"