Skip to content

Commit

Permalink
fixup test to allow slow update of ttjj
Browse files Browse the repository at this point in the history
  • Loading branch information
refraction-ray committed Mar 21, 2020
1 parent eb77ff3 commit 26b15eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ def test_csvio():
delete_csvlines(path=ioconf["path"] + "000311.csv")
hs300 = xa.fundinfo("000311", **ioconf)
len3 = len(hs300.price)
assert len1 == len2
assert len1 == len2 or len1 - len2 == -1 # temp fixup
# there may be time lag for update of .js API, i.e. 天天基金的该 API 不一定能保证更新昨天的净值,即使不是 QDII
assert len1 == len3
delete_csvlines(path=ioconf["path"] + "001211.csv")
zogqb2 = xa.mfundinfo("001211", **ioconf)
Expand All @@ -168,7 +169,7 @@ def test_fund_update():
delete_csvlines(path=ioconf["path"] + "501029.csv", lines=83)
zghl = xa.fundinfo("501029", **ioconf)
len2 = len(zghl.price)
assert len1 == len2
assert len1 == len2 or len1 - len2 == -1 # similar fix up
jxzl = xa.mfundinfo("002758", **ioconf)
netvalue = jxzl.price.iloc[-1]["netvalue"]
len3 = len(jxzl.price)
Expand Down

0 comments on commit 26b15eb

Please sign in to comment.