Skip to content

Commit 1ff2f72

Browse files
committed
TST Fix failing test due to revision in WB data via @jnmclarty
jnmclarty/pandas@b65839d
1 parent 7b9ec9d commit 1ff2f72

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas_datareader/tests/test_wb.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,14 @@ def test_wdi_download(self):
5151

5252
expected = {'NY.GDP.PCAP.CD': {('Canada', '2003'): 28026.006013044702, ('Mexico', '2003'): 6601.0420648056606, ('Canada', '2004'): 31829.522562759001, ('Kosovo', '2003'): 1969.56271307405, ('Mexico', '2004'): 7042.0247834044303, ('United States', '2004'): 41928.886136479705, ('United States', '2003'): 39682.472247320402, ('Kosovo', '2004'): 2135.3328465238301}}
5353
expected = pandas.DataFrame(expected)
54+
# Round, to ignore revisions to data.
55+
expected = pandas.np.round(expected,decimals=-3)
5456
expected.sort(inplace=True)
5557
result = download(country=cntry_codes, indicator=inds,
5658
start=2003, end=2004, errors='ignore')
5759
result.sort(inplace=True)
60+
# Round, to ignore revisions to data.
61+
result = pandas.np.round(result,decimals=-3)
5862
expected.index = result.index
5963
assert_frame_equal(result, pandas.DataFrame(expected))
6064

0 commit comments

Comments
 (0)