def test_run_2(): rt = ReplaceMulticlass(columns=col1) rt.fit(data) assert_frame_equal(rt.transform(data), data_out1)
def test_run_3(): rt = ReplaceMulticlass() rt.fit(data) assert_frame_equal(rt.transform(data), data_out1)
def test_transform_data_type(): rt = ReplaceMulticlass(columns=col) rt.fit(data) with pytest.raises(TypeError): rt.transform(np.array(data))
def test_fitting_error(): rt = ReplaceMulticlass(columns=col) with pytest.raises(AttributeError): rt.transform(data)
def test_fit_data_no_columns_exist(): rt = ReplaceMulticlass(columns=col_no_include) with pytest.raises(NameError): rt.fit(data)
def test_fit_data_type(): rt = ReplaceMulticlass(columns=col) with pytest.raises(TypeError): rt.fit(np.array(data))
def test_init_columns_type_error(): with pytest.raises(TypeError): ReplaceMulticlass(columns=np.array(col))