MCPcopy Create free account
hub / github.com/numpy/numpy / test_compile2

Method test_compile2

numpy/distutils/tests/test_system_info.py:251–265  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

249 @pytest.mark.skipif('msvc' in repr(ccompiler.new_compiler()),
250 reason="Fails with MSVC compiler ")
251 def test_compile2(self):
252 # Compile source and link the second source
253 tsi = self.c_temp2
254 c = customized_ccompiler()
255 extra_link_args = tsi.calc_extra_info()['extra_link_args']
256 previousDir = os.getcwd()
257 try:
258 # Change directory to not screw up directories
259 os.chdir(self._dir2)
260 c.compile([os.path.basename(self._src2)], output_dir=self._dir2,
261 extra_postargs=extra_link_args)
262 # Ensure that the object exists
263 assert_(os.path.isfile(self._src2.replace('.c', '.o')))
264 finally:
265 os.chdir(previousDir)
266
267 HAS_MKL = "mkl_rt" in mkl_info().calc_libraries_info().get("libraries", [])
268

Callers

nothing calls this directly

Calls 5

customized_ccompilerFunction · 0.90
assert_Function · 0.90
calc_extra_infoMethod · 0.80
replaceMethod · 0.80
compileMethod · 0.45

Tested by

no test coverage detected