Author: Paweł Piotr Przeradowski <przeradow...@gmail.com> Branch: pythoninspect-fix Changeset: r65669:a4689d27a2ef Date: 2013-07-25 21:49 +0200 http://bitbucket.org/pypy/pypy/changeset/a4689d27a2ef/
Log: skip on CPython, whatsnew diff --git a/pypy/doc/whatsnew-head.rst b/pypy/doc/whatsnew-head.rst --- a/pypy/doc/whatsnew-head.rst +++ b/pypy/doc/whatsnew-head.rst @@ -31,3 +31,9 @@ more precise information about which functions can be called. Needed for Topaz. .. branch: ssl_moving_write_buffer + +.. branch: pythoninspect-fix +Make PyPy respect PYTHONINSPECT variable set via os.putenv in the same process +to start interactive prompt when the script execution finishes. This adds +new __pypy__.os.real_getenv call that bypasses Python cache and looksup env +in the underlying OS. Translatorshell now works on PyPy. diff --git a/pypy/interpreter/test/test_app_main.py b/pypy/interpreter/test/test_app_main.py --- a/pypy/interpreter/test/test_app_main.py +++ b/pypy/interpreter/test/test_app_main.py @@ -707,6 +707,11 @@ assert '42\n' in data def test_putenv_fires_interactive_within_process(self): + try: + import __pypy__ + except ImportError: + py.test.skip("This can be only tested on PyPy with get_realenv") + # should be noninteractive when piped in data = 'import os\nos.putenv("PYTHONINSPECT", "1")\n' self.run('', senddata=data, expect_prompt=False) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit