diff options
author | Jaime <jaime.frio@gmail.com> | 2015-08-01 18:27:55 -0700 |
---|---|---|
committer | Jaime <jaime.frio@gmail.com> | 2015-08-01 18:27:55 -0700 |
commit | c33d59db5d8ba1449a7abde6883179619acef0ab (patch) | |
tree | 45699df35bc3b460517de635aacb1c90ec5daa5a | |
parent | 4ec0b91a6308b29979935bec1e6ee30417af9eb2 (diff) | |
parent | 27d6c3c8e7c19e10796022b11035ef02ec374dcc (diff) | |
download | numpy-c33d59db5d8ba1449a7abde6883179619acef0ab.tar.gz |
Merge pull request #6138 from cgohlke/patch-2
Fix test_system_info errors and failures on Windows
-rw-r--r-- | numpy/distutils/tests/test_system_info.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/numpy/distutils/tests/test_system_info.py b/numpy/distutils/tests/test_system_info.py index 205f53d27..f9d45319e 100644 --- a/numpy/distutils/tests/test_system_info.py +++ b/numpy/distutils/tests/test_system_info.py @@ -6,6 +6,7 @@ from tempfile import mkstemp, mkdtemp from numpy.distutils import ccompiler from numpy.testing import TestCase, run_module_suite, assert_, assert_equal +from numpy.testing.decorators import skipif from numpy.distutils.system_info import system_info, ConfigParser from numpy.distutils.system_info import default_lib_dirs, default_include_dirs @@ -24,7 +25,7 @@ def get_class(name, notfound_action=1): simple_site = """ [ALL] -library_dirs = {dir1:s}:{dir2:s} +library_dirs = {dir1:s}{pathsep:s}{dir2:s} libraries = {lib1:s},{lib2:s} extra_compile_args = -I/fake/directory runtime_library_dirs = {dir1:s} @@ -107,7 +108,8 @@ class TestSystemInfoReading(TestCase): 'dir1': self._dir1, 'lib1': self._lib1, 'dir2': self._dir2, - 'lib2': self._lib2 + 'lib2': self._lib2, + 'pathsep': os.pathsep }) # Write site.cfg fd, self._sitecfg = mkstemp() @@ -179,11 +181,13 @@ class TestSystemInfoReading(TestCase): os.chdir(self._dir1) c.compile([os.path.basename(self._src1)], output_dir=self._dir1) # Ensure that the object exists - assert_(os.path.isfile(self._src1.replace('.c', '.o'))) + assert_(os.path.isfile(self._src1.replace('.c', '.o')) or + os.path.isfile(self._src1.replace('.c', '.obj'))) os.chdir(previousDir) except OSError: pass + @skipif('msvc' in repr(ccompiler.new_compiler())) def test_compile2(self): # Compile source and link the second source tsi = self.c_temp2 |