Skip to content

Commit 06cfdca

Browse files
committed
TST: import pandas_datareader, use for tests
TST: remove some deprecation warnings from imports
1 parent 61cd97a commit 06cfdca

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

ci/requirements-2.7_SLOW.pip

Whitespace-only changes.

pandas/io/tests/test_data.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@
99
import numpy as np
1010
import pandas as pd
1111
from pandas import DataFrame, Timestamp
12-
from pandas.io import data as web
13-
from pandas.io.data import DataReader, SymbolWarning, RemoteDataError, _yahoo_codes
1412
from pandas.util.testing import (assert_series_equal, assert_produces_warning,
1513
network, assert_frame_equal)
1614
import pandas.util.testing as tm
1715

16+
with tm.assert_produces_warning(FutureWarning, check_stacklevel=False):
17+
from pandas.io import data as web
18+
19+
from pandas.io.data import DataReader, SymbolWarning, RemoteDataError, _yahoo_codes
20+
1821
if compat.PY3:
1922
from urllib.error import HTTPError
2023
else:

pandas/io/tests/test_wb.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
from pandas.util.testing import network
66
from pandas.util.testing import assert_frame_equal
77
from numpy.testing.decorators import slow
8-
from pandas.io.wb import search, download, get_countries
98
import pandas.util.testing as tm
109

10+
# deprecated
11+
with tm.assert_produces_warning(FutureWarning, check_stacklevel=False):
12+
from pandas.io.wb import search, download, get_countries
1113

1214
class TestWB(tm.TestCase):
1315

pandas/tests/test_rplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# -*- coding: utf-8 -*-
22
from pandas.compat import range
3-
import pandas.tools.rplot as rplot
43
import pandas.util.testing as tm
54
from pandas import read_csv
65
import os
7-
86
import nose
97

8+
with tm.assert_produces_warning(FutureWarning, check_stacklevel=False):
9+
import pandas.tools.rplot as rplot
1010

1111
def curpath():
1212
pth, _ = os.path.split(os.path.abspath(__file__))

0 commit comments

Comments
 (0)