Author: Alex Gaynor <[email protected]>
Branch:
Changeset: r48534:de9715d6219f
Date: 2011-10-27 13:58 -0400
http://bitbucket.org/pypy/pypy/changeset/de9715d6219f/
Log: fix this test
diff --git a/pypy/jit/metainterp/optimizeopt/test/test_optimizebasic.py
b/pypy/jit/metainterp/optimizeopt/test/test_optimizebasic.py
--- a/pypy/jit/metainterp/optimizeopt/test/test_optimizebasic.py
+++ b/pypy/jit/metainterp/optimizeopt/test/test_optimizebasic.py
@@ -4206,10 +4206,12 @@
class FakeCallInfoCollection:
def callinfo_for_oopspec(self, oopspecindex):
calldescrtype = type(LLtypeMixin.strequaldescr)
+ effectinfotype =
type(LLtypeMixin.strequaldescr.get_extra_info())
for value in LLtypeMixin.__dict__.values():
if isinstance(value, calldescrtype):
extra = value.get_extra_info()
- if extra and extra.oopspecindex == oopspecindex:
+ if (extra and isinstance(extra, effectinfotype) and
+ extra.oopspecindex == oopspecindex):
# returns 0 for 'func' in this test
return value, 0
raise AssertionError("not found: oopspecindex=%d" %
diff --git a/pypy/jit/metainterp/optimizeopt/test/test_optimizeopt.py
b/pypy/jit/metainterp/optimizeopt/test/test_optimizeopt.py
--- a/pypy/jit/metainterp/optimizeopt/test/test_optimizeopt.py
+++ b/pypy/jit/metainterp/optimizeopt/test/test_optimizeopt.py
@@ -5800,10 +5800,12 @@
class FakeCallInfoCollection:
def callinfo_for_oopspec(self, oopspecindex):
calldescrtype = type(LLtypeMixin.strequaldescr)
+ effectinfotype =
type(LLtypeMixin.strequaldescr.get_extra_info())
for value in LLtypeMixin.__dict__.values():
if isinstance(value, calldescrtype):
extra = value.get_extra_info()
- if extra and extra.oopspecindex == oopspecindex:
+ if (extra and isinstance(extra, effectinfotype) and
+ extra.oopspecindex == oopspecindex):
# returns 0 for 'func' in this test
return value, 0
raise AssertionError("not found: oopspecindex=%d" %
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit