Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove unnecessary try-excepts

we only import from _decorators when importing from
numpy.testing.decorators failed, so there is no point in trying to do
it again.
  • Loading branch information...
commit 62cc379d3b454923cb48e94663f385f54ec806cc 1 parent b64f754
@ivanov authored
View
3  IPython/external/decorators/__init__.py
@@ -3,5 +3,4 @@
from numpy.testing.noseclasses import KnownFailure
except ImportError:
from _decorators import *
- # KnownFailure imported in _decorators from local version of
- # noseclasses which is in _numpy_testing_noseclasses
+ from _numpy_testing_noseclasses import KnownFailure
View
11 IPython/external/decorators/_decorators.py
@@ -20,15 +20,8 @@
#from numpy.testing.utils import \
# WarningManager, WarningMessage
# Our version:
-try:
- from numpy.testing.utils import WarningManager, WarningMessage
-except ImportError:
- from _numpy_testing_utils import WarningManager, WarningMessage
-
-try:
- from numpy.testing.noseclasses import KnownFailure, KnownFailureTest
-except ImportError:
- from _numpy_testing_noseclasses import KnownFailure, KnownFailureTest
+from _numpy_testing_utils import WarningManager
+from _numpy_testing_noseclasses import KnownFailureTest
# End IPython changes
Please sign in to comment.
Something went wrong with that request. Please try again.