1
1
from __future__ import print_function
2
2
from pandas import compat
3
- import unittest
4
3
import warnings
5
4
import nose
6
5
from nose .tools import assert_equal
@@ -39,15 +38,17 @@ def assert_n_failed_equals_n_null_columns(wngs, obj, cls=SymbolWarning):
39
38
assert msgs .str .contains ('|' .join (failed_symbols )).all ()
40
39
41
40
42
- class TestGoogle (unittest .TestCase ):
41
+ class TestGoogle (tm .TestCase ):
43
42
@classmethod
44
43
def setUpClass (cls ):
44
+ super (TestGoogle , cls ).setUpClass ()
45
45
cls .locales = tm .get_locales (prefix = 'en_US' )
46
46
if not cls .locales :
47
47
raise nose .SkipTest ("US English locale not available for testing" )
48
48
49
49
@classmethod
50
50
def tearDownClass (cls ):
51
+ super (TestGoogle , cls ).tearDownClass ()
51
52
del cls .locales
52
53
53
54
@network
@@ -109,9 +110,10 @@ def test_get_multi2(self):
109
110
assert_n_failed_equals_n_null_columns (w , result )
110
111
111
112
112
- class TestYahoo (unittest .TestCase ):
113
+ class TestYahoo (tm .TestCase ):
113
114
@classmethod
114
115
def setUpClass (cls ):
116
+ super (TestYahoo , cls ).setUpClass ()
115
117
_skip_if_no_lxml ()
116
118
117
119
@network
@@ -228,9 +230,10 @@ def test_get_date_ret_index(self):
228
230
assert np .issubdtype (pan .values .dtype , np .floating )
229
231
230
232
231
- class TestYahooOptions (unittest .TestCase ):
233
+ class TestYahooOptions (tm .TestCase ):
232
234
@classmethod
233
235
def setUpClass (cls ):
236
+ super (TestYahooOptions , cls ).setUpClass ()
234
237
_skip_if_no_lxml ()
235
238
236
239
# aapl has monthlies
@@ -245,6 +248,7 @@ def setUpClass(cls):
245
248
246
249
@classmethod
247
250
def tearDownClass (cls ):
251
+ super (TestYahooOptions , cls ).tearDownClass ()
248
252
del cls .aapl , cls .expiry
249
253
250
254
@network
@@ -287,9 +291,10 @@ def test_get_put_data(self):
287
291
assert len (puts )> 1
288
292
289
293
290
- class TestOptionsWarnings (unittest .TestCase ):
294
+ class TestOptionsWarnings (tm .TestCase ):
291
295
@classmethod
292
296
def setUpClass (cls ):
297
+ super (TestOptionsWarnings , cls ).setUpClass ()
293
298
_skip_if_no_lxml ()
294
299
295
300
with assert_produces_warning (FutureWarning ):
@@ -304,6 +309,7 @@ def setUpClass(cls):
304
309
305
310
@classmethod
306
311
def tearDownClass (cls ):
312
+ super (TestOptionsWarnings , cls ).tearDownClass ()
307
313
del cls .aapl , cls .year , cls .month
308
314
309
315
@network
@@ -346,7 +352,7 @@ def test_get_put_data_warning(self):
346
352
warnings .warn ("IndexError thrown no tables found" )
347
353
348
354
349
- class TestDataReader (unittest .TestCase ):
355
+ class TestDataReader (tm .TestCase ):
350
356
def test_is_s3_url (self ):
351
357
from pandas .io .common import _is_s3_url
352
358
self .assert_ (_is_s3_url ("s3://pandas/somethingelse.com" ))
@@ -376,7 +382,7 @@ def test_read_famafrench(self):
376
382
assert isinstance (ff , dict )
377
383
378
384
379
- class TestFred (unittest .TestCase ):
385
+ class TestFred (tm .TestCase ):
380
386
@network
381
387
def test_fred (self ):
382
388
"""
0 commit comments