summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorAlan McIntyre <alan.mcintyre@local>2008-07-18 13:00:29 +0000
committerAlan McIntyre <alan.mcintyre@local>2008-07-18 13:00:29 +0000
commitf3bef65f681d7a845a699071a0b11f3e5d68fea5 (patch)
tree788d20c6f4cc3a02afb3e59734140019977b27aa /numpy
parent3e4f726759a8fef08887c8152c051e04995f3a42 (diff)
downloadnumpy-f3bef65f681d7a845a699071a0b11f3e5d68fea5.tar.gz
Comment cleanup.
Fixed __import__ calls for Python 2.4 (__import__ doesn't take keyword args in 2.4).
Diffstat (limited to 'numpy')
-rw-r--r--numpy/testing/noseclasses.py7
-rw-r--r--numpy/testing/nosetester.py2
2 files changed, 4 insertions, 5 deletions
diff --git a/numpy/testing/noseclasses.py b/numpy/testing/noseclasses.py
index 6b26a58c5..0867d5bc3 100644
--- a/numpy/testing/noseclasses.py
+++ b/numpy/testing/noseclasses.py
@@ -178,7 +178,7 @@ class numpyDoctest(npd.Doctest):
self.finder = numpyDocTestFinder()
self.parser = doctest.DocTestParser()
- # Turns on whitespace normalization, set a minimal execution context
+ # Turn on whitespace normalization, set a minimal execution context
# for doctests, implement a "#random" directive to allow executing a
# command while ignoring its output.
def loadTestsFromModule(self, module):
@@ -221,7 +221,7 @@ class numpyDoctest(npd.Doctest):
p = pkg_name.split('.')
p1 = '.'.join(p[:-1])
p2 = p[-1]
- test.globs[p2] = __import__(pkg_name, fromlist=[p2])
+ test.globs[p2] = __import__(pkg_name, test.globs, {}, [p2])
print 'additional import for %s: from %s import %s' % (test.filename, p1, p2)
print ' (%s): %r' % (pkg_name, test.globs[p2])
@@ -240,8 +240,7 @@ class numpyDoctest(npd.Doctest):
numpy.set_printoptions(**print_state)
- # Implement a wantFile method so that we can ignore NumPy-specific
- # build files that shouldn't be searched for tests
+ # Ignore NumPy-specific build files that shouldn't be searched for tests
def wantFile(self, file):
bn = os.path.basename(file)
if bn in _doctest_ignore:
diff --git a/numpy/testing/nosetester.py b/numpy/testing/nosetester.py
index 0c54a8b64..d4a98fa78 100644
--- a/numpy/testing/nosetester.py
+++ b/numpy/testing/nosetester.py
@@ -236,7 +236,7 @@ class NoseTester(object):
from noseclasses import numpyDoctest
plugins = [numpyDoctest(), ]
for m, p in nose.plugins.builtin.builtins:
- mod = __import__(m,fromlist=[p])
+ mod = __import__(m,globals(),{},[p])
plug = getattr(mod, p)
plugins.append(plug())