From c2dd51c24e4d8300598ae502becd91cf2e844664 Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Fri, 28 Sep 2012 09:20:17 -0400 Subject: [PATCH] Cleaned up unittests in response to Eddie's comments. --- tests/test_transforms.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_transforms.py b/tests/test_transforms.py index e3cc1961..4f6cae0f 100644 --- a/tests/test_transforms.py +++ b/tests/test_transforms.py @@ -298,7 +298,8 @@ class BatchTransformTestCase(TestCase): algo = BatchTransformAlgorithm(sids=[0, 1]) algo.run(self.source) - assert algo.history_return_price_class[:2] == algo.history_return_price_decorator[:2] == [None, None], "First two iterations should return None" + self.assertEqual(algo.history_return_price_class[:2], [None, None], "First two iterations should return None") + self.assertEqual(algo.history_return_price_decorator[:2], [None, None], "First two iterations should return None") # test overloaded class for test_history in [algo.history_return_price_class, algo.history_return_price_decorator]: @@ -308,9 +309,9 @@ class BatchTransformTestCase(TestCase): def test_passing_of_args(self): algo = BatchTransformAlgorithm([0, 1], 1, kwarg='str') - algo.run(self.source) self.assertEqual(algo.args, (1,)) self.assertEqual(algo.kwargs, {'kwarg':'str'}) + + algo.run(self.source) expected_item = ((1, ), {'kwarg': 'str'}) self.assertEqual(algo.history_return_args, [None, None, expected_item, expected_item, expected_item]) -