]> granicus.if.org Git - python/commitdiff
Merged revisions 73921 via svnmerge from
authorTarek Ziadé <ziade.tarek@gmail.com>
Fri, 10 Jul 2009 09:13:17 +0000 (09:13 +0000)
committerTarek Ziadé <ziade.tarek@gmail.com>
Fri, 10 Jul 2009 09:13:17 +0000 (09:13 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73921 | tarek.ziade | 2009-07-10 11:10:33 +0200 (Fri, 10 Jul 2009) | 1 line

  Fixed #6455 (the test shall use pyd files under win32, rather than so files)
........

Lib/distutils/tests/test_build_ext.py
Misc/NEWS

index e01c882069690474086a1e7bbc826b79f0e9225d..153c875644195a76ce7189503604f086886e0e08 100644 (file)
@@ -296,20 +296,21 @@ class BuildExtTestCase(support.TempdirManager,
         self.assertEquals(lastdir, 'bar')
 
     def test_ext_fullpath(self):
+        ext = sysconfig.get_config_vars()['SO']
         dist = Distribution()
         cmd = build_ext(dist)
         cmd.inplace = 1
         cmd.distribution.package_dir = {'': 'src'}
         cmd.distribution.packages = ['lxml', 'lxml.html']
         curdir = os.getcwd()
-        wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so')
+        wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext)
         path = cmd.get_ext_fullpath('lxml.etree')
         self.assertEquals(wanted, path)
 
         # building lxml.etree not inplace
         cmd.inplace = 0
         cmd.build_lib = os.path.join(curdir, 'tmpdir')
-        wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree.so')
+        wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext)
         path = cmd.get_ext_fullpath('lxml.etree')
         self.assertEquals(wanted, path)
 
@@ -319,13 +320,13 @@ class BuildExtTestCase(support.TempdirManager,
         cmd.distribution.packages = ['twisted', 'twisted.runner.portmap']
         path = cmd.get_ext_fullpath('twisted.runner.portmap')
         wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner',
-                              'portmap.so')
+                              'portmap' + ext)
         self.assertEquals(wanted, path)
 
         # building twisted.runner.portmap inplace
         cmd.inplace = 1
         path = cmd.get_ext_fullpath('twisted.runner.portmap')
-        wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so')
+        wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext)
         self.assertEquals(wanted, path)
 
 def test_suite():
index f59cf4dddd99f3d91727ec792ea63abde3abbd48..abb01e45530c2b4d2a66f392e76ffbf63a63b35a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -262,6 +262,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #6455: Fixed test_build_ext under win32. 
+
 - Issue #6403: Fixed package path usage in build_ext.
 
 - Issue #6287: Added the license field in Distutils documentation.