diff --git a/pandas/io/tests/test_data.py b/pandas/io/tests/test_data.py index 378befb0c0922..a044b388c00c4 100644 --- a/pandas/io/tests/test_data.py +++ b/pandas/io/tests/test_data.py @@ -145,7 +145,6 @@ def test_get_quote_string(self): @network def test_get_quote_stringlist(self): - raise nose.SkipTest('unreliable test') df = web.get_quote_yahoo(['GOOG', 'AAPL', 'GOOG']) assert_series_equal(df.ix[0], df.ix[2]) diff --git a/pandas/util/testing.py b/pandas/util/testing.py index c1d06eac4abf5..41bad7f87f0da 100644 --- a/pandas/util/testing.py +++ b/pandas/util/testing.py @@ -12,6 +12,7 @@ import subprocess import locale import unittest +import traceback from datetime import datetime from functools import wraps, partial @@ -978,9 +979,10 @@ def dec(f): # skip tests on exceptions with this message _network_error_messages = ( - 'urlopen error timed out', - 'timeout: timed out', - 'socket.timeout: timed out', + # 'urlopen error timed out', + # 'timeout: timed out', + # 'socket.timeout: timed out', + 'timed out', 'HTTP Error 503: Service Unavailable', ) @@ -1138,7 +1140,12 @@ def wrapper(*args, **kwargs): raise SkipTest("Skipping test due to known errno" " and error %s" % e) - if any([m.lower() in str(e).lower() for m in _skip_on_messages]): + try: + e_str = traceback.format_exc(e) + except: + e_str = str(e) + + if any([m.lower() in e_str.lower() for m in _skip_on_messages]): raise SkipTest("Skipping test because exception message is known" " and error %s" % e)