示例#1
0
 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)
示例#2
0
 def test_set_calc_config_not_calcconfig(self):
     with self.assertRaises(ValueError):
         indices.GVIndex(df=self.simple_df, calc_config="wrong_class")
示例#3
0
 def test_set_df_not_pandas(self):
     with self.assertRaises(ValueError):
         indices.GVIndex(df="test", calc_config=self.mock_5_mg_config)
示例#4
0
 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")
示例#5
0
 def test_calculate_not_implemented(self):
     with self.assertRaises(NotImplementedError):
         indices.GVIndex(df=self.simple_df,
                         calc_config=self.mock_5_mg_config).calculate()