pypy/objspace/std/test/test_methodcache.py::AppTestMethodCaching::()::test_mutate_class
self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x00007fed6297b280>
def test_mutate_class(self):
> @self.retry
def run():
import __pypy__
[/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/objspace/std/test/test_methodcache.py:177]:2:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
run = <Function run>
> ???
?:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
@self.retry
def run():
import __pypy__
class A(object):
x = 1
y = 2
__pypy__.reset_method_cache_counter()
a = A()
for i in range(100):
assert a.y == 2
assert a.x == i + 1
A.x += 1
cache_counter = __pypy__.method_cache_counter("x")
# XXX this is the bad case for the mapdict cache: looking up
# non-method attributes from the class
> assert cache_counter[0] >= 450
E (application-level) AssertionError: assert 398 >= 450
[/Users/matti/build-worker-x86_64/own-macos-x86-64/build/pypy/objspace/std/test/test_methodcache.py:177]:17: AssertionError
builder: own-macos-x86-64 build #1387+
test: pypy/objspace/std/test/test_methodcache.py::AppTestMethodCaching::()::test_mutate_class