Skip to content

Commit

Permalink
0.5.9 update test
Browse files Browse the repository at this point in the history
  • Loading branch information
zengbin93 committed Dec 26, 2020
1 parent f675b21 commit 441faf2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
7 changes: 6 additions & 1 deletion test/test_analyze.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# coding: utf-8
import sys

sys.path.insert(0, '.')
sys.path.insert(0, '..')
import os
import pandas as pd
from czsc.analyze import KlineAnalyze, find_zs
from czsc.analyze import KlineAnalyze
from czsc.signals import find_zs

cur_path = os.path.split(os.path.realpath(__file__))[0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import os
import pandas as pd
import czsc
from czsc.cobra.factor_analyst import cal_nbar_income, cal_nbar_percentile
from czsc.cobra.analyst import cal_nbar_income, cal_nbar_percentile

warnings.warn("czsc version is {}".format(czsc.__version__))

Expand All @@ -26,7 +26,7 @@ def test_nbar():
kn = bars[i+1: i+n+1]

ni = cal_nbar_income(k1, kn, n)
assert ni == 3.91
assert ni == 391.31

np = cal_nbar_percentile(k1, kn, n)
assert np == 87.06
Expand Down
6 changes: 6 additions & 0 deletions test/test_plot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# coding: utf-8
import sys
import warnings

sys.path.insert(0, '.')
sys.path.insert(0, '..')

import os
import pandas as pd
import random
Expand Down
6 changes: 6 additions & 0 deletions test/test_signals.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import sys
import warnings

sys.path.insert(0, '.')
sys.path.insert(0, '..')

from czsc.data.jq import get_kline
from czsc.data import freq_map
from czsc.signals import KlineSignals
Expand Down

0 comments on commit 441faf2

Please sign in to comment.