[pypy-svn] pypy default: always create the stdout and stderr files when running py.test -s, else we get an file not found error few lines later

antocuni commits-noreply at bitbucket.org
Tue Feb 15 10:27:05 CET 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: 
Changeset: r41942:3845990a1a7f
Date: 2011-02-15 10:25 +0100
http://bitbucket.org/pypy/pypy/changeset/3845990a1a7f/

Log:	always create the stdout and stderr files when running py.test -s,
	else we get an file not found error few lines later

diff --git a/lib-python/conftest.py b/lib-python/conftest.py
--- a/lib-python/conftest.py
+++ b/lib-python/conftest.py
@@ -696,6 +696,8 @@
                 cmd += ' --pdb'
             if self.config.option.capture == 'no':
                 status = os.system(cmd)
+                stdout.write('')
+                stderr.write('')
             else:
                 status = os.system("%s >>%s 2>>%s" %(cmd, stdout, stderr))
             if os.WIFEXITED(status):


More information about the Pypy-commit mailing list