Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(81154)

Unified Diff: Lib/distutils/tests/test_build_ext.py

Issue 23670: Modifications to support iOS as a development platform
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/ctypes/util.py ('k') | Lib/distutils/tests/test_build_py.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/distutils/tests/test_build_ext.py Tue Mar 01 10:26:10 2016 +0200
+++ b/Lib/distutils/tests/test_build_ext.py Wed Mar 02 00:01:35 2016 +0000
@@ -35,16 +35,17 @@ class BuildExtTestCase(TempdirManager,
self.old_user_base = site.USER_BASE
site.USER_BASE = self.mkdtemp()
from distutils.command import build_ext
build_ext.USER_BASE = site.USER_BASE
def build_ext(self, *args, **kwargs):
return build_ext(*args, **kwargs)
+ @unittest.skipUnless(os.name == 'nt' or (os.name == 'posix' and hasattr(os, 'fork')), "distutils cannot spawn child processes")
def test_build_ext(self):
global ALREADY_TESTED
copy_xxmodule_c(self.tmp_dir)
xx_c = os.path.join(self.tmp_dir, 'xxmodule.c')
xx_ext = Extension('xx', [xx_c])
dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]})
dist.package_dir = self.tmp_dir
cmd = self.build_ext(dist)
@@ -283,16 +284,17 @@ class BuildExtTestCase(TempdirManager,
# when the command is run
dist = Distribution()
cmd = self.build_ext(dist)
cmd.compiler = 'unix'
cmd.ensure_finalized()
cmd.run()
self.assertEqual(cmd.compiler, 'unix')
+ @unittest.skipUnless(os.name == 'nt' or (os.name == 'posix' and hasattr(os, 'fork')), "distutils cannot spawn child processes")
def test_get_outputs(self):
tmp_dir = self.mkdtemp()
c_file = os.path.join(tmp_dir, 'foo.c')
self.write_file(c_file, 'void PyInit_foo(void) {}\n')
ext = Extension('foo', [c_file], optional=False)
dist = Distribution({'name': 'xx',
'ext_modules': [ext]})
cmd = self.build_ext(dist)
« no previous file with comments | « Lib/ctypes/util.py ('k') | Lib/distutils/tests/test_build_py.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+