From c45c44b5c83fd4708213b54f8b13bbccfd983f32 Mon Sep 17 00:00:00 2001 From: fawce Date: Wed, 12 Sep 2012 13:29:05 -0400 Subject: [PATCH] fixes per code review --- tests/test_exception_handling.py | 10 +++++----- zipline/utils/test_utils.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_exception_handling.py b/tests/test_exception_handling.py index 0594353d..8e21f35b 100644 --- a/tests/test_exception_handling.py +++ b/tests/test_exception_handling.py @@ -46,8 +46,8 @@ class ExceptionTestCase(TestCase): output, _ = drain_zipline(self, zipline) self.assertEqual( - ctx.exception.message, - 'integer division or modulo by zero' + ctx.exception.message, + 'integer division or modulo by zero' ) @@ -149,6 +149,6 @@ class ExceptionTestCase(TestCase): output, _ = drain_zipline(self, zipline) self.assertEqual( - ctx.exception.message, - 'Too much time spent in handle_data call' - ) + ctx.exception.message, + 'Too much time spent in handle_data call' + ) diff --git a/zipline/utils/test_utils.py b/zipline/utils/test_utils.py index 7d80cefe..9ec7326c 100644 --- a/zipline/utils/test_utils.py +++ b/zipline/utils/test_utils.py @@ -70,7 +70,7 @@ def drain_zipline(test, zipline): for update in zipline: msg_counter += 1 output.append(update) - if update.has_key('daily_perf'): + if 'daily_perf' in update: transaction_count += \ len(update['daily_perf']['transactions'])