BUG: Adds missing parens to AssetFinder sids property

This commit is contained in:
jfkirk
2015-08-31 15:27:55 -04:00
parent 6c6ecd0a86
commit 5320fd0fc5
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -671,6 +671,16 @@ class AssetFinderTestCase(TestCase):
actual_result = finder.lifetimes(dates)
assert_frame_equal(actual_result, expected_result)
def test_sids(self):
# Ensure that the sids property of the AssetFinder is functioning
env = TradingEnvironment()
env.write_data(equities_identifiers=[1, 2, 3])
sids = env.asset_finder.sids
self.assertEqual(3, len(sids))
self.assertTrue(1 in sids)
self.assertTrue(2 in sids)
self.assertTrue(3 in sids)
class TestFutureChain(TestCase):
+1 -1
View File
@@ -439,7 +439,7 @@ class AssetFinder(object):
def sids(self):
return tuple(map(
itemgetter('sid'),
sa.select(self.asset_router.c.sid,).execute().fetchall(),
sa.select((self.asset_router.c.sid,)).execute().fetchall(),
))
def _lookup_generic_scalar(self,