From d52a9f3a67c00217e3d142cc2f3337ef7d904c52 Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Wed, 30 Jan 2013 14:00:06 -0500 Subject: [PATCH] Corrects wording on event_window test, with regards to empty values. These tests ensure that there are three, not two, empty values at the beginning of the transform. Also, ensures that we are using a window length of 3 on the tests. So that wordings of errors,etc. match the window length. --- tests/test_transforms.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/test_transforms.py b/tests/test_transforms.py index 8b775990..26b01b27 100644 --- a/tests/test_transforms.py +++ b/tests/test_transforms.py @@ -320,14 +320,21 @@ class TestBatchTransform(TestCase): algo = BatchTransformAlgorithm() algo.run(self.source) wl = algo.window_length + # The following assertion depend on window length of 3 + self.assertEqual(wl, 3) self.assertEqual(algo.history_return_price_class[:wl], [None] * wl, - "First two iterations should return None") + "First three iterations should return None." + "\n" + + "i.e. no returned values until window is full'" + + "%s" % (algo.history_return_price_class,)) self.assertEqual(algo.history_return_price_decorator[:wl], [None] * wl, - "First two iterations should return None") + "First three iterations should return None." + "\n" + + "i.e. no returned values until window is full'" + + "%s" % (algo.history_return_price_decorator,)) + # After three Nones, the next value should be a data frame self.assertTrue(isinstance( - algo.history_return_price_class[wl + 1], + algo.history_return_price_class[wl], pd.DataFrame) )