some minor compatibility issues wrt to the just released python2.7
--HG-- branch : trunk
This commit is contained in:
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user