Skip to content

Commit 14a1833

Browse files
gliptakbashtage
authored andcommitted
Correct IEX unit test (#506)
Signed-off-by: Gábor Lipták <[email protected]>
1 parent aa33f46 commit 14a1833

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pandas_datareader/tests/test_iex_daily.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import pytest
44

55
import pandas_datareader.data as web
6+
import pandas.util.testing as tm
67

78

89
class TestIEXDaily(object):
@@ -62,12 +63,12 @@ def test_multiple_symbols_2(self):
6263
assert len(t) == 73
6364

6465
expected1 = a.loc["2017-02-09"]
65-
assert expected1["close"] == 132.42
66-
assert expected1["high"] == 132.445
66+
tm.assert_almost_equal(expected1["close"], 130.36, check_less_precise=True)
67+
tm.assert_almost_equal(expected1["high"], 130.38, check_less_precise=True)
6768

6869
expected2 = a.loc["2017-05-24"]
69-
assert expected2["close"] == 153.34
70-
assert expected2["high"] == 154.17
70+
tm.assert_almost_equal(expected2["close"], 151.57, check_less_precise=True)
71+
tm.assert_almost_equal(expected2["high"], 152.40, check_less_precise=True)
7172

7273
expected3 = t.loc["2017-02-09"]
7374
assert expected3["close"] == 269.20

0 commit comments

Comments
 (0)