From 78557b8611963f7b79e17892272529c1cb6deff0 Mon Sep 17 00:00:00 2001 From: Huayong Kuang Date: Wed, 12 Jun 2024 20:30:16 +0800 Subject: [PATCH] update get_bars testcase --- tests/test_api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_api.py b/tests/test_api.py index 9c1b2a3..47c8242 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -1115,6 +1115,10 @@ def test_get_bars(): print(df) assert not df.empty + arr = get_bars("M9999.XDCE", 48, unit='1M', fields='close', end_dt=None, df=False) + assert isinstance(arr, np.ndarray) + assert len(arr) == 48 + def test_get_bars2(): codes = ["600000.XSHG", "000001.XSHG", "A2205.XDCE"]