diff --git a/tests/test_transforms.py b/tests/test_transforms.py index f0d2d420..100da652 100644 --- a/tests/test_transforms.py +++ b/tests/test_transforms.py @@ -293,7 +293,6 @@ class TestTALIB(TestCase): self.source, self.panel = \ factory.create_test_panel_ohlc_source(sim_params) - @unittest.skip def test_talib_with_default_params(self): BLACKLIST = ['make_transform', 'BatchTransform', # TODO: Figure out why MAVP generates a KeyError @@ -345,9 +344,6 @@ class TestTALIB(TestCase): # self.source, self.panel = \ # factory.create_test_panel_ohlc_source(self.sim_params) - # TODO: Remove this skip, after debugging why sometimes the talib_results - # contain to many leading nans. - @unittest.skip def test_multiple_talib_with_args(self): zipline_transforms = [ta.MA(0, window_length=10), ta.MA(0, window_length=25)] @@ -355,10 +351,12 @@ class TestTALIB(TestCase): algo = TALIBAlgorithm(talib=zipline_transforms) algo.run(self.source) # Test if computed values match those computed by pandas rolling mean. - np.testing.assert_array_equal(np.array(algo.talib_results.values()[0]), + talib_values = np.array(algo.talib_results[zipline_transforms[0]]) + np.testing.assert_array_equal(talib_values, pd.rolling_mean(self.panel[0]['price'], 10).values) - np.testing.assert_array_equal(np.array(algo.talib_results.values()[1]), + talib_values = np.array(algo.talib_results[zipline_transforms[1]]) + np.testing.assert_array_equal(talib_values, pd.rolling_mean(self.panel[0]['price'], 25).values) for t in zipline_transforms: