From a14d702a0da1e541aee0682376d269979be3fdc5 Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Thu, 6 Dec 2012 15:26:49 -0500 Subject: [PATCH] STY: Replaced hardcoded values with variables. --- tests/test_transforms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_transforms.py b/tests/test_transforms.py index 9ed507f2..2f1b2d0d 100644 --- a/tests/test_transforms.py +++ b/tests/test_transforms.py @@ -341,7 +341,9 @@ class TestBatchTransform(TestCase): # test overloaded class for test_history in [algo.history_return_price_class, algo.history_return_price_decorator]: - for i in range(3, 6): + # starting at window length, the window should contain + # consecutive (of window length) numbers up till the end. + for i in range(algo.window_length, len(test_history)): np.testing.assert_array_equal( range(i - algo.window_length + 1, i + 1), test_history[i].values.flatten()