Author: Antonio Cuni <[email protected]>
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
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit