[pypy-commit] pypy default: backout da193f0b119d. Done in this way, "print()" will print an empty
arigo
noreply at buildbot.pypy.org
Fri May 2 10:26:06 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r71193:0bdf01779070
Date: 2014-05-02 10:25 +0200
http://bitbucket.org/pypy/pypy/changeset/0bdf01779070/
Log: backout da193f0b119d. Done in this way, "print()" will print an
empty tuple in Python 2. Is this really necessary for the py3k
branch?
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.__code__:
+ if entry.code == f1.func_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.__code__]
- ebar = entries[bar.__code__]
+ efoo = entries[foo.func_code]
+ ebar = entries[bar.func_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()
@@ -219,12 +219,12 @@
lines.remove(line)
break
else:
- print('NOT FOUND: %s' % pattern.rstrip('\n'))
- print('--- GOT ---')
- print(got)
- print()
- print('--- EXPECTED ---')
- print(expected)
+ print 'NOT FOUND:', pattern.rstrip('\n')
+ print '--- GOT ---'
+ print got
+ print
+ print '--- EXPECTED ---'
+ print expected
assert False
assert not lines
finally:
More information about the pypy-commit
mailing list