本文整理匯總了Python中arctic.tickstore.toplevel.TopLevelTickStore.read方法的典型用法代碼示例。如果您正苦於以下問題:Python TopLevelTickStore.read方法的具體用法?Python TopLevelTickStore.read怎麽用?Python TopLevelTickStore.read使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類arctic.tickstore.toplevel.TopLevelTickStore
的用法示例。
在下文中一共展示了TopLevelTickStore.read方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_read
# 需要導入模塊: from arctic.tickstore.toplevel import TopLevelTickStore [as 別名]
# 或者: from arctic.tickstore.toplevel.TopLevelTickStore import read [as 別名]
def test_read():
self = create_autospec(TopLevelTickStore)
tsl = TickStoreLibrary(create_autospec(TickStore), create_autospec(DateRange))
self._get_libraries.return_value = [tsl, tsl]
dr = create_autospec(DateRange)
with patch("pandas.concat") as concat:
res = TopLevelTickStore.read(
self, sentinel.symbol, dr, columns=sentinel.include_columns, include_images=sentinel.include_images
)
assert concat.call_args_list == [call([tsl.library.read.return_value, tsl.library.read.return_value])]
assert res == concat.return_value
assert tsl.library.read.call_args_list == [
call(
sentinel.symbol,
tsl.date_range.intersection.return_value,
sentinel.include_columns,
include_images=sentinel.include_images,
),
call(
sentinel.symbol,
tsl.date_range.intersection.return_value,
sentinel.include_columns,
include_images=sentinel.include_images,
),
]