[pypy-commit] pypy win32-fixes3: app_main.py needs __pypy__ for windows console codepage handling

mattip noreply at buildbot.pypy.org
Fri Apr 26 13:49:33 CEST 2013


Author: mattip <matti.picus at gmail.com>
Branch: win32-fixes3
Changeset: r63635:fbe73ecc1d01
Date: 2013-04-20 22:16 +0300
http://bitbucket.org/pypy/pypy/changeset/fbe73ecc1d01/

Log:	app_main.py needs __pypy__ for windows console codepage handling

diff --git a/pypy/interpreter/test2/test_app_main.py b/pypy/interpreter/test2/test_app_main.py
--- a/pypy/interpreter/test2/test_app_main.py
+++ b/pypy/interpreter/test2/test_app_main.py
@@ -577,6 +577,11 @@
 class TestNonInteractive:
     def run_with_status_code(self, cmdline, senddata='', expect_prompt=False,
             expect_banner=False, python_flags='', env=None):
+        if os.name == 'nt':
+            try:
+                import __pypy__
+            except:
+                py.test.skip('app_main cannot run on non-pypy for windows')
         cmdline = '%s %s "%s" %s' % (sys.executable, python_flags,
                                      app_main, cmdline)
         print 'POPEN:', cmdline
@@ -705,6 +710,11 @@
         assert 'copyright' not in data
 
     def test_non_interactive_stdout_fully_buffered(self):
+        if os.name == 'nt':
+            try:
+                import __pypy__
+            except:
+                py.test.skip('app_main cannot run on non-pypy for windows')
         path = getscript(r"""
             import sys, time
             sys.stdout.write('\x00(STDOUT)\n\x00')   # stays in buffers
@@ -725,6 +735,11 @@
 
     def test_non_interactive_stdout_unbuffered(self, monkeypatch):
         monkeypatch.setenv('PYTHONUNBUFFERED', '1')
+        if os.name == 'nt':
+            try:
+                import __pypy__
+            except:
+                py.test.skip('app_main cannot run on non-pypy for windows')
         path = getscript(r"""
             import sys, time
             sys.stdout.write('\x00(STDOUT)\n\x00')


More information about the pypy-commit mailing list