def test_X_type(self): """Test error is thrown if X is not a pd.DataFrame.""" test_masker = Masker() with pytest.raises(TypeError): test_masker.get_column_map(X=123)
def test_column_map_attribute_created(self, data): """Test that the column_map attribute is created for the Masker object.""" test_masker = Masker() test_masker.get_column_map(X=data) assert hasattr(test_masker, "column_map")
def test_column_map_attribute_value(self, data): """Test that the column_map attribute takes the expect values.""" test_masker = Masker() test_masker.get_column_map(X=data) expected_map = { "col1": "column_0", "col2": "column_1", "col3": "column_2", "col4": "column_3", } assert test_masker.column_map == expected_map