mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-13 17:42:42 +08:00
BUG: get_splits should return empty list, not empty dict
This commit is contained in:
@@ -401,6 +401,10 @@ class DataPortalTestBase(WithDataPortal,
|
||||
"Asset 10000 had a trade on fourth minute, so should "
|
||||
"return that as the last trade on the fifth.")
|
||||
|
||||
def test_get_empty_splits(self):
|
||||
splits = self.data_portal.get_splits([], self.trading_days[2])
|
||||
self.assertEqual([], splits)
|
||||
|
||||
|
||||
class TestDataPortal(DataPortalTestBase):
|
||||
DATA_PORTAL_LAST_AVAILABLE_SESSION = None
|
||||
|
||||
@@ -1139,7 +1139,7 @@ class DataPortal(object):
|
||||
List of splits, where each split is a (asset, ratio) tuple.
|
||||
"""
|
||||
if self._adjustment_reader is None or not assets:
|
||||
return {}
|
||||
return []
|
||||
|
||||
# convert dt to # of seconds since epoch, because that's what we use
|
||||
# in the adjustments db
|
||||
|
||||
Reference in New Issue
Block a user