summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2020-03-07 21:28:18 -0700
committerGitHub <noreply@github.com>2020-03-07 21:28:18 -0700
commit24192935730d6dbb24e3d11b7f40f309b786c0ad (patch)
treee96c2b313ce5e7063680c36a8e94da44f4ea8ddb
parent8087e1de04d011f7ce66bf80dbef4a0599b14f7a (diff)
parent3c1f89d91de3265e8e930809b08c2e39b18a4857 (diff)
downloadnumpy-24192935730d6dbb24e3d11b7f40f309b786c0ad.tar.gz
Merge pull request #15723 from mattip/fix-logic
BUG: fix logic error when nm fails on 32-bit
-rw-r--r--numpy/distutils/tests/test_mingw32ccompiler.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/numpy/distutils/tests/test_mingw32ccompiler.py b/numpy/distutils/tests/test_mingw32ccompiler.py
index 100fba429..ebedacb32 100644
--- a/numpy/distutils/tests/test_mingw32ccompiler.py
+++ b/numpy/distutils/tests/test_mingw32ccompiler.py
@@ -19,12 +19,15 @@ def test_build_import():
except FileNotFoundError:
pytest.skip("'nm.exe' not on path, is mingw installed?")
supported = out[out.find(b'supported targets:'):]
- if sys.maxsize < 2**32 and b'pe-i386' not in supported:
- raise ValueError("'nm.exe' found but it does not support 32-bit "
- "dlls when using 32-bit python")
+ if sys.maxsize < 2**32:
+ if b'pe-i386' not in supported:
+ raise ValueError("'nm.exe' found but it does not support 32-bit "
+ "dlls when using 32-bit python. Supported "
+ "formats: '%s'" % supported)
elif b'pe-x86-64' not in supported:
raise ValueError("'nm.exe' found but it does not support 64-bit "
- "dlls when using 64-bit python")
+ "dlls when using 64-bit python. Supported "
+ "formats: '%s'" % supported)
# Hide the import library to force a build
has_import_lib, fullpath = mingw32ccompiler._check_for_import_lib()
if has_import_lib: