From 2aafe8bd4c6152830f286f2c808d57a672b93307 Mon Sep 17 00:00:00 2001 From: zengbin93 Date: Fri, 19 Jun 2020 16:01:13 +0800 Subject: [PATCH] =?UTF-8?q?0.4.1=20=E4=BC=98=E5=8C=96KlineAnalyze=E6=80=A7?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/profile_df.py | 9 ++++++++- test/test_analyze.py | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/test/profile_df.py b/test/profile_df.py index bbcb9e3..5f29a53 100644 --- a/test/profile_df.py +++ b/test/profile_df.py @@ -1,5 +1,12 @@ +# coding: utf-8 +import sys +import warnings +sys.path.insert(0, ".") +sys.path.insert(0, "..") +import czsc +warnings.warn(f"czsc version is {czsc.__version__}") + from cobra.data.kline import get_kline -from czsc import KlineAnalyze import pandas as pd from czsc.analyze import KlineAnalyze from datetime import datetime, timedelta diff --git a/test/test_analyze.py b/test/test_analyze.py index 148e04e..82a5521 100644 --- a/test/test_analyze.py +++ b/test/test_analyze.py @@ -11,7 +11,7 @@ from czsc.analyze import is_bei_chi, find_zs warnings.warn(f"czsc version is {czsc.__version__}") df = get_kline(ts_code="000001.SH", end_dt="2020-04-28 15:00:00", freq='D', asset='I') -ka = KlineAnalyze(df, name="日线") +ka = KlineAnalyze(df, name="日线", bi_mode='old') print(ka) @@ -20,7 +20,7 @@ def test_kline_analyze(): assert ka.xd[-1]['fx_mark'] == 'd' # 测试背驰识别 - assert not ka.bi_bei_chi() + assert ka.bi_bei_chi() assert ka.xd_bei_chi() print(ka.zs[-2]) -- GitLab