From 64029a9e7e8100d22fdfef3ffab7cd4b8eee1e75 Mon Sep 17 00:00:00 2001 From: Scott Sanderson Date: Wed, 28 Dec 2016 14:40:18 -0500 Subject: [PATCH] TEST: Tweaks to vectorized symbol tests. - Test against an empty list. - Don't test empty share class lookups. - Add another comprehension test for completeness. --- tests/test_assets.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_assets.py b/tests/test_assets.py index 557638dd..2e31b3ec 100644 --- a/tests/test_assets.py +++ b/tests/test_assets.py @@ -1513,7 +1513,8 @@ class TestVectorizedSymbolLookup(WithAssetFinder, ZiplineTestCase): '2015-01-02', ], utc=True), symbols=[ - ['A.'], ['B.'], ['C.'], ['D.'], + [], + ['A'], ['B'], ['C'], ['D'], list('ABCD'), list('ABCDDCBA'), list('AABBAABBACABD'), @@ -1546,3 +1547,7 @@ class TestVectorizedSymbolLookup(WithAssetFinder, ZiplineTestCase): results = af.lookup_symbols(syms, dt, fuzzy=True) assert_equal(results, af.retrieve_all([1, 3, 7])) + assert_equal( + results, + [af.lookup_symbol(sym, dt, fuzzy=True) for sym in syms], + )