Skip to content

BUG: Removed import nose on top of testing.py script #4030

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2013
Merged
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
11 changes: 6 additions & 5 deletions pandas/util/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from distutils.version import LooseVersion
import urllib2
import nose

from numpy.random import randn
import numpy as np
Expand Down Expand Up @@ -755,6 +754,7 @@ def network(t, raise_on_error=_RAISE_NETWORK_ERROR_DEFAULT,
network connectivity. ``_RAISE_NETWORK_ERROR_DEFAULT`` in
``pandas/util/testing.py`` sets the default behavior (currently False).
"""
from nose import SkipTest
t.network = True

@wraps(t)
Expand All @@ -765,7 +765,7 @@ def network_wrapper(*args, **kwargs):
try:
return t(*args, **kwargs)
except error_classes as e:
raise nose.SkipTest("Skipping test %s" % e)
raise SkipTest("Skipping test %s" % e)

return network_wrapper

Expand Down Expand Up @@ -839,21 +839,22 @@ def with_connectivity_check(t, url="http://www.google.com",
...
SkipTest
"""
from nose import SkipTest
t.network = True

@wraps(t)
def wrapper(*args, **kwargs):
if check_before_test and not raise_on_error:
if not can_connect(url):
raise nose.SkipTest
raise SkipTest
try:
return t(*args, **kwargs)
except error_classes as e:
if raise_on_error or can_connect(url):
raise
else:
raise nose.SkipTest("Skipping test due to lack of connectivity"
" and error %s" % e)
raise SkipTest("Skipping test due to lack of connectivity"
" and error %s" % e)

return wrapper

Expand Down