some minor compatibility issues wrt to the just released python2.7

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-07-04 22:13:12 +02:00
parent 223a04be27
commit b28c439494
7 changed files with 25 additions and 15 deletions

View File

@@ -23,10 +23,7 @@ def test_invoke_compile(recwarn, monkeypatch):
monkeypatch.setattr(py.builtin.builtins, 'compile', None)
py.magic.invoke(compile=True)
try:
co = compile("""if 1:
def f():
return 1
\n""", '', 'exec')
co = compile("def f(): return 1\n", '', 'exec')
d = {}
py.builtin.exec_(co, d)
assert py.code.Source(d['f'])