mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
Merged revisions 72781 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72781 | tarek.ziade | 2009-05-19 18:17:21 +0200 (Tue, 19 May 2009) | 1 line fixed the 'package' option of build_ext ........
This commit is contained in:
parent
f84d7e9ed2
commit
822eb84400
3 changed files with 38 additions and 11 deletions
|
@ -336,6 +336,28 @@ class BuildExtTestCase(TempdirManager,
|
|||
so_dir = os.path.dirname(so_file)
|
||||
self.assertEquals(so_dir, cmd.build_lib)
|
||||
|
||||
# inplace = 0, cmd.package = 'bar'
|
||||
cmd.package = 'bar'
|
||||
path = cmd.get_ext_fullpath('foo')
|
||||
# checking that the last directory is bar
|
||||
path = os.path.split(path)[0]
|
||||
lastdir = os.path.split(path)[-1]
|
||||
self.assertEquals(lastdir, cmd.package)
|
||||
|
||||
# inplace = 1, cmd.package = 'bar'
|
||||
cmd.inplace = 1
|
||||
other_tmp_dir = os.path.realpath(self.mkdtemp())
|
||||
old_wd = os.getcwd()
|
||||
os.chdir(other_tmp_dir)
|
||||
try:
|
||||
path = cmd.get_ext_fullpath('foo')
|
||||
finally:
|
||||
os.chdir(old_wd)
|
||||
# checking that the last directory is bar
|
||||
path = os.path.split(path)[0]
|
||||
lastdir = os.path.split(path)[-1]
|
||||
self.assertEquals(lastdir, cmd.package)
|
||||
|
||||
def test_suite():
|
||||
src = _get_source_filename()
|
||||
if not os.path.exists(src):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue