[pypy-dev] [pypy-commit] pypy py3k: save the source of applevel direct tests in a temporary file: this way, we get nicer tracebacks

Maciej Fijalkowski fijall at gmail.com
Wed Mar 7 20:12:15 CET 2012


Can we have this on default as well please?

On Thu, Feb 9, 2012 at 7:12 AM, antocuni <noreply at buildbot.pypy.org> wrote:
> Author: Antonio Cuni <anto.cuni at gmail.com>
> Branch: py3k
> Changeset: r52297:5c66b92f0617
> Date: 2012-02-09 15:35 +0100
> http://bitbucket.org/pypy/pypy/changeset/5c66b92f0617/
>
> Log:    save the source of applevel direct tests in a temporary file: this
>        way, we get nicer tracebacks
>
> diff --git a/pypy/conftest.py b/pypy/conftest.py
> --- a/pypy/conftest.py
> +++ b/pypy/conftest.py
> @@ -213,8 +213,10 @@
>             raise AssertionError("DID NOT RAISE")
>  """
>     source = py.code.Source(target)[1:].deindent()
> +    pyfile = udir.join('src.py')
> +    pyfile.write(helpers + str(source))
>     res, stdout, stderr = runsubprocess.run_subprocess(
> -        python, ["-c", helpers + str(source)])
> +        python, [str(pyfile)])
>     print source
>     print >> sys.stdout, stdout
>     print >> sys.stderr, stderr
> _______________________________________________
> pypy-commit mailing list
> pypy-commit at python.org
> http://mail.python.org/mailman/listinfo/pypy-commit


More information about the pypy-dev mailing list