Skip to content

Commit 439ccea

Browse files
committed
wip
1 parent cf6a117 commit 439ccea

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

pandas_data_readers/tests/test_data.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@
99
import numpy as np
1010
import pandas as pd
1111
from pandas import DataFrame, Timestamp
12-
from pandas.util.testing import (assert_series_equal, assert_produces_warning,
13-
network, assert_frame_equal)
12+
from pandas.util.testing import (assert_frame_equal, assert_series_equal,
13+
network)
14+
try:
15+
from pandas.util.testing import assert_produces_warning
16+
except ImportError:
17+
assert_produces_warning = None
18+
1419
import pandas.util.testing as tm
1520
from numpy.testing import assert_array_equal
1621

@@ -401,6 +406,9 @@ def tearDownClass(cls):
401406

402407
@network
403408
def test_options_source_warning(self):
409+
if not assert_produces_warning:
410+
raise SkipTest("old version of pandas without "
411+
"compat.assert_produces_warning")
404412
with assert_produces_warning():
405413
aapl = web.Options('aapl')
406414

pandas_data_readers/tests/test_wb.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
import nose
22

33
import pandas
4-
from pandas.compat import u
54
from pandas.util.testing import network
65
from pandas.util.testing import assert_frame_equal
76
from numpy.testing.decorators import slow
87
import pandas.util.testing as tm
98

109
from pandas_data_readers.wb import search, download, get_countries
1110

11+
try:
12+
from pandas.compat import u
13+
except ImportError:
14+
try:
15+
unicode # python 2
16+
def u(s):
17+
return unicode(s, "unicode_escape")
18+
except NameError:
19+
def u(s):
20+
return s
21+
1222

1323
class TestWB(tm.TestCase):
1424

0 commit comments

Comments
 (0)