File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed
pandas_data_readers/tests Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 9
9
import numpy as np
10
10
import pandas as pd
11
11
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
+
14
19
import pandas .util .testing as tm
15
20
from numpy .testing import assert_array_equal
16
21
@@ -401,6 +406,9 @@ def tearDownClass(cls):
401
406
402
407
@network
403
408
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" )
404
412
with assert_produces_warning ():
405
413
aapl = web .Options ('aapl' )
406
414
Original file line number Diff line number Diff line change 1
1
import nose
2
2
3
3
import pandas
4
- from pandas .compat import u
5
4
from pandas .util .testing import network
6
5
from pandas .util .testing import assert_frame_equal
7
6
from numpy .testing .decorators import slow
8
7
import pandas .util .testing as tm
9
8
10
9
from pandas_data_readers .wb import search , download , get_countries
11
10
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
+
12
22
13
23
class TestWB (tm .TestCase ):
14
24
You can’t perform that action at this time.
0 commit comments