From bbad5b386a528ab39551150b300eaa0282956cbf Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Mon, 2 Dec 2013 13:19:00 -0500 Subject: [PATCH] MAINT: Removed unused test_utils.check functions. The test_utils were the only references to the blist package, removing so that blist can be removed as a dependency. --- README.md | 1 - docs/installation.rst | 1 - etc/requirements.txt | 2 -- setup.py | 1 - zipline/utils/test_utils.py | 43 ------------------------------------- 5 files changed, 48 deletions(-) diff --git a/README.md b/README.md index 7c0df164..76847a4f 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,6 @@ Dependencies * pandas (>= 0.9.0) * pytz * Logbook -* blist * requests * iso8601 * [python-dateutil](https://pypi.python.org/pypi/python-dateutil) (>= 2.1) diff --git a/docs/installation.rst b/docs/installation.rst index 23ce77b6..bc560d82 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -25,7 +25,6 @@ Dependencies * pytz * iso8601 * Logbook -* blist Develop diff --git a/etc/requirements.txt b/etc/requirements.txt index dc683a3e..2d862ee5 100644 --- a/etc/requirements.txt +++ b/etc/requirements.txt @@ -3,8 +3,6 @@ iso8601==0.1.4 # Logging Logbook==0.6.0 -blist==1.3.4 - # Scientific Libraries pytz==2013.8 diff --git a/setup.py b/setup.py index e72c8ad4..70b915f8 100644 --- a/setup.py +++ b/setup.py @@ -64,7 +64,6 @@ setup( install_requires=[ 'iso8601', 'Logbook', - 'blist', 'pytz', 'requests', 'numpy', diff --git a/zipline/utils/test_utils.py b/zipline/utils/test_utils.py index 75b410d3..a4c679f8 100644 --- a/zipline/utils/test_utils.py +++ b/zipline/utils/test_utils.py @@ -1,6 +1,3 @@ -from datetime import datetime -import blist -from itertools import izip_longest from logbook import FileHandler from zipline.finance.blotter import ORDER_STATUS @@ -15,46 +12,6 @@ def teardown_logger(test): test.log_handler.close() -def check_list(test, a, b, label): - test.assertIsInstance(a, (list, blist.blist), "not list at: " + label) - test.assertIsInstance(b, (list, blist.blist), "not list at: " + label) - for i, (a_val, b_val) in enumerate(izip_longest(a, b)): - check(test, a_val, b_val, label + "[" + str(i) + "]") - - -def check_dict(test, a, b, label): - test.assertIsInstance(a, dict, "not dict at: " + label) - test.assertIsInstance(b, dict, "not dict at: " + label) - test.assertEqual(sorted(a), sorted(b), "different keys at: " + label) - for key in a: - a_val = a[key] - b_val = b[key] - check(test, a_val, b_val, label + "." + key) - - -def check_datetime(test, a, b, label): - test.assertIsInstance(a, datetime, "not datetime at: " + label) - test.assertIsInstance(b, datetime, "not datetime at: " + label) - test.assertEqual(a, b, "mismatched dates " + label) - - -def check(test, a, b, label=None): - """ - Check equality for arbitrarily nested dicts and lists that terminate - in types that allow direct comparisons (string, ints, floats, datetimes) - """ - if not label: - label = '' - if isinstance(a, dict): - check_dict(test, a, b, label) - elif isinstance(a, (list, blist.blist)): - check_list(test, a, b, label) - elif isinstance(a, datetime): - check_datetime(test, a, b, label) - else: - test.assertEqual(a, b, "mismatch on path: " + label) - - def drain_zipline(test, zipline): output = [] transaction_count = 0