summaryrefslogtreecommitdiff
path: root/numpy/testing/utils.py
diff options
context:
space:
mode:
authorAlan McIntyre <alan.mcintyre@local>2008-07-30 20:50:20 +0000
committerAlan McIntyre <alan.mcintyre@local>2008-07-30 20:50:20 +0000
commita80dbfe6e36a1c4cc455c3ce9b6e563588c7524c (patch)
tree2e4233dbb21e528b59ba3d6e7445937e562c125c /numpy/testing/utils.py
parentb78d3be51653f6241214f6354303bd261af1b426 (diff)
downloadnumpy-a80dbfe6e36a1c4cc455c3ce9b6e563588c7524c.tar.gz
Delay import from inspect to reduce startup time.
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r--numpy/testing/utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py
index f8f4c72a9..749a825b1 100644
--- a/numpy/testing/utils.py
+++ b/numpy/testing/utils.py
@@ -6,7 +6,6 @@ import os
import sys
import re
import operator
-from inspect import isfunction
from nosetester import import_nose
__all__ = ['assert_equal', 'assert_almost_equal','assert_approx_equal',
@@ -368,6 +367,10 @@ def decorate_methods(cls, decorator, testmatch=None):
else:
testmatch = re.compile(testmatch)
cls_attr = cls.__dict__
+
+ # delayed import to reduce startup time
+ from inspect import isfunction
+
methods = filter(isfunction, cls_attr.values())
for function in methods:
try: