Author: Philip Jenvey <[email protected]>
Branch: 
Changeset: r72464:24db6697b691
Date: 2014-07-16 14:51 -0700
http://bitbucket.org/pypy/pypy/changeset/24db6697b691/

Log:    py3k compat

diff --git a/pypy/interpreter/test/test_generator.py 
b/pypy/interpreter/test/test_generator.py
--- a/pypy/interpreter/test/test_generator.py
+++ b/pypy/interpreter/test/test_generator.py
@@ -17,7 +17,7 @@
             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 @@
         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 @@
     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
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to