From 600d444136cb0a624e94f84f0890597a47982937 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 13 Oct 2006 19:35:28 +0000 Subject: [PATCH] Fix some problems with testing on old docutils installations [SVN r35594] --- test/numpy.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/test/numpy.py b/test/numpy.py index afd5fdcf..af3e90ed 100644 --- a/test/numpy.py +++ b/test/numpy.py @@ -151,22 +151,18 @@ def _run(args = None): # See which of the numeric modules are installed has_numeric = 0 - try: - import Numeric - m = Numeric + try: import Numeric + except ImportError: pass + else: has_numeric = 1 - except ImportError: - global numeric_tests - numeric_tests = None + m = Numeric has_numarray = 0 - try: - import numarray - m = numarray + try: import numarray + except ImportError: pass + else: has_numarray = 1 - except ImportError: - global _numarray_tests - _numarray_tests = None + m = numarray # Bail if neither one is installed if not (has_numeric or has_numarray):