Skip to content

Commit a582b2b

Browse files
authored
TST: fix testing for yahoo get_data_null_as_missing comparisons (#367)
* TST: fix testing for yahoo get_data_null_as_missing comparisons xref #357 * Revert "CI: use latest pandas" This reverts commit 3b8b11a.
1 parent 3b8b11a commit a582b2b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.travis.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ matrix:
2222
- PYTHON=3.6 PANDAS=0.19.2
2323
- dist: trusty
2424
env:
25-
- PYTHON=3.6 PANDAS=LATEST
25+
- PYTHON=3.6 PANDAS=0.20.2
2626
# In allow failures
2727
- dist: trusty
2828
env:
@@ -57,8 +57,6 @@ install:
5757
conda install numpy pytz python-dateutil;
5858
PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com";
5959
pip install --pre --upgrade --timeout=60 -f $PRE_WHEELS pandas;
60-
elif [[ "$PANDAS" == "LATEST" ]]; then
61-
conda install pandas
6260
else
6361
conda install pandas=$PANDAS;
6462
fi

pandas_datareader/tests/yahoo/test_yahoo.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,13 @@ def test_get_data_null_as_missing_data(self, adj_pr):
137137
result = web.get_data_yahoo('SRCE', '20160626', '20160705',
138138
adjust_price=adj_pr)
139139
# sanity checking
140-
assert result.dtypes.all() == np.floating
140+
floats = ['Open', 'High', 'Low', 'Close']
141+
if adj_pr:
142+
floats.append('Adj_Ratio')
143+
else:
144+
floats.append('Adj Close')
145+
146+
assert result[floats].dtypes.all() == np.floating
141147

142148
@skip_on_exception(RemoteDataError)
143149
def test_get_data_multiple_symbols_two_dates(self):

0 commit comments

Comments
 (0)