Esempio n. 1
0
def test_run_2():
    rt = ReplaceMulticlass(columns=col1)
    rt.fit(data)
    assert_frame_equal(rt.transform(data), data_out1)
Esempio n. 2
0
def test_run_3():
    rt = ReplaceMulticlass()
    rt.fit(data)
    assert_frame_equal(rt.transform(data), data_out1)
Esempio n. 3
0
def test_transform_data_type():
    rt = ReplaceMulticlass(columns=col)
    rt.fit(data)
    with pytest.raises(TypeError):
        rt.transform(np.array(data))
Esempio n. 4
0
def test_fitting_error():
    rt = ReplaceMulticlass(columns=col)
    with pytest.raises(AttributeError):
        rt.transform(data)
Esempio n. 5
0
def test_fit_data_no_columns_exist():
    rt = ReplaceMulticlass(columns=col_no_include)
    with pytest.raises(NameError):
        rt.fit(data)
Esempio n. 6
0
def test_fit_data_type():
    rt = ReplaceMulticlass(columns=col)
    with pytest.raises(TypeError):
        rt.fit(np.array(data))
Esempio n. 7
0
def test_init_columns_type_error():
    with pytest.raises(TypeError):
        ReplaceMulticlass(columns=np.array(col))