Home - Summaries: (main) : (py3.11) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

pypy/objspace/std/test/test_methodcache.py::AppTestMethodCaching::()::test_mutate_class

self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc482e4350>

    def test_mutate_class(self):
>           @self.retry
            def run():
                import __pypy__

[/build_dir/own-linux-aarch64/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

[/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/test_methodcache.py:177]:17: AssertionError
builder: own-linux-aarch64 build #2718
test: pypy/objspace/std/test/test_methodcache/py/AppTestMethodCaching/()/test_mutate_class