summaryrefslogtreecommitdiff
path: root/numpy/f2py/tests/util.py
diff options
context:
space:
mode:
authorxoviat <xoviat@users.noreply.github.com>2017-09-04 23:32:26 -0500
committerxoviat <xoviat@users.noreply.github.com>2017-09-04 23:33:25 -0500
commit917652ab0ebc7dfcba5b87902829658fff754730 (patch)
tree36b1d15d6b2ce8d1f79c06eea003a7b2b52275c8 /numpy/f2py/tests/util.py
parent37878bfb4aa9db5860887ad994c4014611812cb3 (diff)
downloadnumpy-917652ab0ebc7dfcba5b87902829658fff754730.tar.gz
TST: fix failures:
1. fail tests related to DLL load failure as they were previously untested. 2. fix have_compiler to return false on old compilers 3. xfail some tests that were not working on old Python versions.
Diffstat (limited to 'numpy/f2py/tests/util.py')
-rw-r--r--numpy/f2py/tests/util.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/numpy/f2py/tests/util.py b/numpy/f2py/tests/util.py
index 55716a2eb..27cf76be4 100644
--- a/numpy/f2py/tests/util.py
+++ b/numpy/f2py/tests/util.py
@@ -16,10 +16,11 @@ import atexit
import textwrap
import re
import random
+import numpy.f2py
from numpy.compat import asbytes, asstr
-import numpy.f2py
-from numpy.testing import SkipTest, temppath
+from numpy.testing import SkipTest, temppath, dec
+from importlib import import_module
try:
from hashlib import md5
@@ -146,8 +147,7 @@ def build_module(source_files, options=[], skip=[], only=[], module_name=None):
os.unlink(fn)
# Import
- __import__(module_name)
- return sys.modules[module_name]
+ return import_module(module_name)
@_memoize
@@ -319,6 +319,7 @@ class F2PyTest(object):
module = None
module_name = None
+ @dec.knownfailureif(sys.platform=='win32', msg='Fails with MinGW64 Gfortran')
def setup(self):
if self.module is not None:
return