Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pandas/io/tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down
15 changes: 11 additions & 4 deletions pandas/util/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import subprocess
import locale
import unittest
import traceback

from datetime import datetime
from functools import wraps, partial
Expand Down Expand Up @@ -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',
)

Expand Down Expand Up @@ -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)

Expand Down