def test_it_checks_columns_in_df(data: pd.DataFrame): with pytest.raises(ValueError): pt = pp.PercentChangeTransformer(['f1', 'target3']) pt.fit(data) with pytest.raises(ValueError): pt = pp.PercentChangeTransformer(['target3', 'f1']) pt.fit(data)
def test_it_checks_no_zeros_in_a(data): with pytest.raises(ValueError): pt = pp.PercentChangeTransformer(['f3', 'target1']) pt.fit(data)
def test_it_checks_no_zeros_in_a(data): with pytest.raises(ValueError): pt = pp.PercentReturns(['f3', 'target1']) pt.fit(data)