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

Method test_compile1

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

Source from the content-addressed store, hash-verified

232
233 @pytest.mark.skipif(not HAVE_COMPILER, reason="Missing compiler")
234 def test_compile1(self):
235 # Compile source and link the first source
236 c = customized_ccompiler()
237 previousDir = os.getcwd()
238 try:
239 # Change directory to not screw up directories
240 os.chdir(self._dir1)
241 c.compile([os.path.basename(self._src1)], output_dir=self._dir1)
242 # Ensure that the object exists
243 assert_(os.path.isfile(self._src1.replace('.c', '.o')) or
244 os.path.isfile(self._src1.replace('.c', '.obj')))
245 finally:
246 os.chdir(previousDir)
247
248 @pytest.mark.skipif(not HAVE_COMPILER, reason="Missing compiler")
249 @pytest.mark.skipif('msvc' in repr(ccompiler.new_compiler()),

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected