Commit 330a9799 authored by Philip Jenvey's avatar Philip Jenvey
Browse files

py3k compat

parent cb8e34d4eaf3
......@@ -17,7 +17,7 @@ class AppTestGenerator:
yield 1
assert g.gi_running
g = f()
assert g.gi_code is f.func_code
assert g.gi_code is f.__code__
assert g.__name__ == 'f'
assert g.gi_frame is not None
assert not g.gi_running
......@@ -26,7 +26,7 @@ class AppTestGenerator:
raises(StopIteration, g.next)
assert not g.gi_running
assert g.gi_frame is None
assert g.gi_code is f.func_code
assert g.gi_code is f.__code__
assert g.__name__ == 'f'
def test_generator3(self):
......@@ -286,13 +286,13 @@ def test_should_not_inline(space):
w_co = space.appexec([], '''():
def g(x):
yield x + 5
return g.func_code
return g.__code__
''')
assert should_not_inline(w_co) == False
w_co = space.appexec([], '''():
def g(x):
yield x + 5
yield x + 6
return g.func_code
return g.__code__
''')
assert should_not_inline(w_co) == True
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment