[pypy-commit] pypy default: readd less controversial py3k compat
pjenvey
noreply at buildbot.pypy.org
Fri May 2 18:31:38 CEST 2014
Author: Philip Jenvey <pjenvey at underboss.org>
Branch:
Changeset: r71200:2b5234972cd9
Date: 2014-05-02 09:30 -0700
http://bitbucket.org/pypy/pypy/changeset/2b5234972cd9/
Log: readd less controversial py3k compat
diff --git a/pypy/module/_lsprof/test/test_cprofile.py b/pypy/module/_lsprof/test/test_cprofile.py
--- a/pypy/module/_lsprof/test/test_cprofile.py
+++ b/pypy/module/_lsprof/test/test_cprofile.py
@@ -43,7 +43,7 @@
)
by_id = set()
for entry in stats:
- if entry.code == f1.func_code:
+ if entry.code == f1.__code__:
assert len(entry.calls) == 2
for subentry in entry.calls:
assert subentry.code in expected
@@ -144,8 +144,8 @@
entries = {}
for entry in stats:
entries[entry.code] = entry
- efoo = entries[foo.func_code]
- ebar = entries[bar.func_code]
+ efoo = entries[foo.__code__]
+ ebar = entries[bar.__code__]
assert 0.9 < efoo.totaltime < 2.9
# --- cannot test .inlinetime, because it does not include
# --- the time spent doing the call to time.time()
More information about the pypy-commit
mailing list