def test_call_self_calculate_on_call(self): with self.assertRaises(NotImplementedError): base_index = indices.GVIndex(calc_config=self.mock_5_mg_config) base_index(self.simple_df)
def test_set_calc_config_not_calcconfig(self): with self.assertRaises(ValueError): indices.GVIndex(df=self.simple_df, calc_config="wrong_class")
def test_set_df_not_pandas(self): with self.assertRaises(ValueError): indices.GVIndex(df="test", calc_config=self.mock_5_mg_config)
def test_call_df_not_pandas(self): with self.assertRaises(ValueError): test_ind = indices.GVIndex(df=self.simple_df, calc_config=self.mock_5_mg_config) indices.GVIndex.__call__(test_ind, df="test")
def test_calculate_not_implemented(self): with self.assertRaises(NotImplementedError): indices.GVIndex(df=self.simple_df, calc_config=self.mock_5_mg_config).calculate()