Author: Philip Jenvey <[email protected]>
Branch: py3k-stdlib-2.7.6-merge
Changeset: r69909:154e2a421de8
Date: 2014-03-12 13:04 -0700
http://bitbucket.org/pypy/pypy/changeset/154e2a421de8/
Log: workaround this obscure py3k only failure
diff --git a/pypy/interpreter/test/test_pyframe.py
b/pypy/interpreter/test/test_pyframe.py
--- a/pypy/interpreter/test/test_pyframe.py
+++ b/pypy/interpreter/test/test_pyframe.py
@@ -1,9 +1,12 @@
+from rpython.tool import udir
from pypy.conftest import option
class AppTestPyFrame:
def setup_class(cls):
+ cls.w_udir = cls.space.wrap(str(udir.udir))
+ cls.w_tempfile1 = cls.space.wrap(str(udir.udir.join('tempfile1')))
if not option.runappdirect:
w_call_further = cls.space.appexec([], """():
def call_further(f):
@@ -61,9 +64,13 @@
f.f_lineno += 1
return x
- def function():
+ # obscure: call open beforehand, py3k's open invokes some app
+ # level code that confuses our tracing (likely due to the
+ # testing env, otherwise it's not a problem)
+ f = open(self.tempfile1, 'w')
+ def function(f=f):
xyz
- with open(self.tempfile1, 'w') as f:
+ with f as f:
pass
return 3
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit