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.
This commit is contained in:
Eddie Hebert
2013-12-02 13:19:00 -05:00
parent 860a340e55
commit bbad5b386a
5 changed files with 0 additions and 48 deletions
-1
View File
@@ -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)
-1
View File
@@ -25,7 +25,6 @@ Dependencies
* pytz
* iso8601
* Logbook
* blist
Develop
-2
View File
@@ -3,8 +3,6 @@ iso8601==0.1.4
# Logging
Logbook==0.6.0
blist==1.3.4
# Scientific Libraries
pytz==2013.8
-1
View File
@@ -64,7 +64,6 @@ setup(
install_requires=[
'iso8601',
'Logbook',
'blist',
'pytz',
'requests',
'numpy',
-43
View File
@@ -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 = '<root>'
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