Author: mattip <[email protected]>
Branch: release-2.3.x
Changeset: r71197:119b5f4c257f
Date: 2014-05-02 15:00 +0300
http://bitbucket.org/pypy/pypy/changeset/119b5f4c257f/
Log: merge default into 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:
diff --git a/pypy/module/pypyjit/test_pypy_c/test_cprofile.py
b/pypy/module/pypyjit/test_pypy_c/test_cprofile.py
--- a/pypy/module/pypyjit/test_pypy_c/test_cprofile.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_cprofile.py
@@ -1,4 +1,4 @@
-import py
+import py, sys
from pypy.module.pypyjit.test_pypy_c.test_00_model import BaseTestPyPyC
class TestCProfile(BaseTestPyPyC):
@@ -26,6 +26,10 @@
for method in ['append', 'pop']:
loop, = log.loops_by_id(method)
print loop.ops_by_id(method)
- assert ' call(' not in repr(loop.ops_by_id(method))
+ # on 32-bit, there is f1=read_timestamp(); ...;
+ # f2=read_timestamp(); f3=call(llong_sub,f1,f2)
+ # which should turn into a single PADDQ/PSUBQ
+ if sys.maxint != 2147483647:
+ assert ' call(' not in repr(loop.ops_by_id(method))
assert ' call_may_force(' not in repr(loop.ops_by_id(method))
assert ' cond_call(' in repr(loop.ops_by_id(method))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit