summaryrefslogtreecommitdiff
path: root/numpy/f2py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2017-09-30 17:59:13 -0600
committerGitHub <noreply@github.com>2017-09-30 17:59:13 -0600
commitd05fd3032cccabf5ed18840b43513a73499af5d6 (patch)
treea9a1d760547e5983c59400249bc8086d73e191c2 /numpy/f2py
parent697609cbb3b49dac0a61370ce7c8cd9b320fc43b (diff)
parent448bb82e6f6ad5d6ff98705a55fe34ccd938446c (diff)
downloadnumpy-d05fd3032cccabf5ed18840b43513a73499af5d6.tar.gz
Merge pull request #9645 from xoviat/appveyor
ENH: enable OpenBLAS on windows.
Diffstat (limited to 'numpy/f2py')
-rw-r--r--numpy/f2py/tests/test_block_docstring.py4
-rw-r--r--numpy/f2py/tests/test_callback.py2
-rw-r--r--numpy/f2py/tests/test_common.py5
-rw-r--r--numpy/f2py/tests/util.py9
4 files changed, 13 insertions, 7 deletions
diff --git a/numpy/f2py/tests/test_block_docstring.py b/numpy/f2py/tests/test_block_docstring.py
index c3f9dc856..eb11201ef 100644
--- a/numpy/f2py/tests/test_block_docstring.py
+++ b/numpy/f2py/tests/test_block_docstring.py
@@ -1,9 +1,10 @@
from __future__ import division, absolute_import, print_function
import textwrap
+import sys
from . import util
-from numpy.testing import run_module_suite, assert_equal
+from numpy.testing import run_module_suite, assert_equal, dec
class TestBlockDocString(util.F2PyTest):
code = """
@@ -15,6 +16,7 @@ class TestBlockDocString(util.F2PyTest):
END
"""
+ @dec.knownfailureif(sys.platform=='win32', msg='Fails with MinGW64 Gfortran (Issue #9673)')
def test_block_docstring(self):
expected = "'i'-array(2,3)\n"
assert_equal(self.module.block.__doc__, expected)
diff --git a/numpy/f2py/tests/test_callback.py b/numpy/f2py/tests/test_callback.py
index ea29043ed..cf7427d20 100644
--- a/numpy/f2py/tests/test_callback.py
+++ b/numpy/f2py/tests/test_callback.py
@@ -2,6 +2,7 @@ from __future__ import division, absolute_import, print_function
import math
import textwrap
+import sys
from numpy import array
from numpy.testing import run_module_suite, assert_, assert_equal, dec
@@ -119,6 +120,7 @@ cf2py intent(out) a
r = t(a.mth)
assert_(r == 9, repr(r))
+ @dec.knownfailureif(sys.platform=='win32', msg='Fails with MinGW64 Gfortran (Issue #9673)')
def test_string_callback(self):
def callback(code):
diff --git a/numpy/f2py/tests/test_common.py b/numpy/f2py/tests/test_common.py
index aaa35b678..81082e575 100644
--- a/numpy/f2py/tests/test_common.py
+++ b/numpy/f2py/tests/test_common.py
@@ -1,11 +1,11 @@
from __future__ import division, absolute_import, print_function
import os
-
-from numpy.testing import run_module_suite, assert_array_equal, dec
+import sys
import numpy as np
from . import util
+from numpy.testing import run_module_suite, assert_array_equal, dec
def _path(*a):
return os.path.join(*((os.path.dirname(__file__),) + a))
@@ -13,6 +13,7 @@ def _path(*a):
class TestCommonBlock(util.F2PyTest):
sources = [_path('src', 'common', 'block.f')]
+ @dec.knownfailureif(sys.platform=='win32', msg='Fails with MinGW64 Gfortran (Issue #9673)')
def test_common_block(self):
self.module.initcb()
assert_array_equal(self.module.block.long_bn,
diff --git a/numpy/f2py/tests/util.py b/numpy/f2py/tests/util.py
index 55716a2eb..881b32810 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 (Issue #9673)')
def setup(self):
if self.module is not None:
return