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

Unified Diff: Lib/test/test_capi.py

Issue 3871: cross and native build of python for mingw32 with distutils
Patch Set: Created 7 years, 4 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/sysconfig.py ('k') | Lib/test/test_curses.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_capi.py Thu Dec 27 23:52:36 2012 +0200
+++ b/Lib/test/test_capi.py Thu Dec 27 17:35:12 2012 -0500
@@ -217,20 +217,21 @@
class EmbeddingTest(unittest.TestCase):
@unittest.skipIf(
- sys.platform.startswith('win'),
- "test doesn't work under Windows")
+ sys.platform.startswith('win') and sys.version.find('GCC') < 0,
+ "test doesn't work with MSVC")
def test_subinterps(self):
- # XXX only tested under Unix checkouts
- basepath = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
+ # XXX only tested under Posix checkouts
+ basepath = support.SAVEDCWD
oldcwd = os.getcwd()
# This is needed otherwise we get a fatal error:
# "Py_Initialize: Unable to get the locale encoding
# LookupError: no codec search functions registered: can't find encoding"
os.chdir(basepath)
try:
- exe = os.path.join(basepath, "Modules", "_testembed")
- if not os.path.exists(exe):
- self.skipTest("%r doesn't exist" % exe)
+ from distutils.spawn import find_executable
+ exe = find_executable("_testembed", basepath)
+ if not exe:
+ self.skipTest("_testembed executable not found")
p = subprocess.Popen([exe],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
« no previous file with comments | « Lib/sysconfig.py ('k') | Lib/test/test_curses.py » ('j') | no next file with comments »

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