From 2587cd65128d4aea7e417692a1b456ac60f0043a Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Wed, 30 Jan 2013 14:04:17 -0500 Subject: [PATCH] Enriches message returned for test batch transform. Adds formatting of the failing values when ReturnPriceBatchTransform's data shape does not match the window_length. --- zipline/test_algorithms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zipline/test_algorithms.py b/zipline/test_algorithms.py index b22d2719..e86e1a21 100644 --- a/zipline/test_algorithms.py +++ b/zipline/test_algorithms.py @@ -237,7 +237,9 @@ class TestRegisterTransformAlgorithm(TradingAlgorithm): class ReturnPriceBatchTransform(BatchTransform): def get_value(self, data): - assert data.shape[1] == self.window_length + assert data.shape[1] == self.window_length, \ + "data shape={0} does not equal window_length={1} for data={2}".\ + format(data.shape[1], self.window_length, data) return data.price