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

pypy/module/bz2/test/test_bz2_file.py::AppTestBZ2File::()::test_creation

self = <CallInfo when='teardown' exception: >
func = <function <lambda> at 0x0000000149d225c0>, when = 'teardown'
treat_keyboard_interrupt_as_exception = False

    def __init__(self, func, when, treat_keyboard_interrupt_as_exception=False):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        self.when = when
        self.start = time()
        try:
>           self.result = func()

../_pytest/runner.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>       lambda: ihook(item=item, **kwds),
        when=when,
        treat_keyboard_interrupt_as_exception=item.config.getvalue("usepdb"),
    )

../_pytest/runner.py:194: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_HookCaller 'pytest_runtest_teardown'>, args = ()
kwargs = {'item': <AppTestMethod 'test_creation'>, 'nextitem': <AppTestMethod 'test_close'>}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.spec and self.spec.argnames:
            notincall = (
                set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
            )
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call".format(tuple(notincall)),
                    stacklevel=2,
                )
>       return self._hookexec(self, self.get_hookimpls(), kwargs)

../_pytest/vendored_packages/pluggy/hooks.py:289: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.config.PytestPluginManager object at 0x0000000118496678>
hook = <_HookCaller 'pytest_runtest_teardown'>
methods = [<HookImpl plugin_name='5518140768', plugin=<rpython.conftest.LeakFinder instance at 0x0000000148e82560>>, <HookImpl p...e66f38>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x0000000148ea9c90>>]
kwargs = {'item': <AppTestMethod 'test_creation'>, 'nextitem': <AppTestMethod 'test_close'>}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
>       return self._inner_hookexec(hook, methods, kwargs)

../_pytest/vendored_packages/pluggy/manager.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = <_HookCaller 'pytest_runtest_teardown'>
methods = [<HookImpl plugin_name='5518140768', plugin=<rpython.conftest.LeakFinder instance at 0x0000000148e82560>>, <HookImpl p...e66f38>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x0000000148ea9c90>>]
kwargs = {'item': <AppTestMethod 'test_creation'>, 'nextitem': <AppTestMethod 'test_close'>}

    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
        methods,
        kwargs,
>       firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
    )

../_pytest/vendored_packages/pluggy/manager.py:62: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook_impls = [<HookImpl plugin_name='5518140768', plugin=<rpython.conftest.LeakFinder instance at 0x0000000148e82560>>, <HookImpl p...e66f38>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x0000000148ea9c90>>]
caller_kwargs = {'item': <AppTestMethod 'test_creation'>, 'nextitem': <AppTestMethod 'test_close'>}
firstresult = False

    def _multicall(hook_impls, caller_kwargs, firstresult=False):
        """Execute a call into multiple python functions/methods and return the
        result(s).
    
        ``caller_kwargs`` comes from _HookCaller.__call__().
        """
        __tracebackhide__ = True
        results = []
        excinfo = None
        try:  # run impl and wrapper setup functions in a loop
            teardowns = []
            try:
                for hook_impl in reversed(hook_impls):
                    try:
                        args = [caller_kwargs[argname] for argname in hook_impl.argnames]
                    except KeyError:
                        for argname in hook_impl.argnames:
                            if argname not in caller_kwargs:
                                raise HookCallError(
                                    "hook call must provide argument %r" % (argname,)
                                )
    
                    if hook_impl.hookwrapper:
                        try:
                            gen = hook_impl.function(*args)
                            next(gen)  # first yield
                            teardowns.append(gen)
                        except StopIteration:
                            _raise_wrapfail(gen, "did not yield")
                    else:
                        res = hook_impl.function(*args)
                        if res is not None:
                            results.append(res)
                            if firstresult:  # halt further impl calls
                                break
            except BaseException:
                excinfo = sys.exc_info()
        finally:
            if firstresult:  # first result hooks return a single value
                outcome = _Result(results[0] if results else None, excinfo)
            else:
                outcome = _Result(results, excinfo)
    
            # run all wrapper post-yield blocks
            for gen in reversed(teardowns):
                try:
                    gen.send(outcome)
                    _raise_wrapfail(gen, "has second yield")
                except StopIteration:
                    pass
    
>           return outcome.get_result()

../_pytest/vendored_packages/pluggy/callers.py:208: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pluggy.callers._Result object at 0x0000000149b78a30>

    def get_result(self):
        """Get the result(s) for this hook call.
    
        If the hook was marked as a ``firstresult`` only a single value
        will be returned otherwise a list of results.
        """
        __tracebackhide__ = True
        if self._excinfo is None:
            return self._result
        else:
            ex = self._excinfo
            if _py3:
                raise ex[1].with_traceback(ex[2])
>           _reraise(*ex)  # noqa

../_pytest/vendored_packages/pluggy/callers.py:81: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook_impls = [<HookImpl plugin_name='5518140768', plugin=<rpython.conftest.LeakFinder instance at 0x0000000148e82560>>, <HookImpl p...e66f38>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x0000000148ea9c90>>]
caller_kwargs = {'item': <AppTestMethod 'test_creation'>, 'nextitem': <AppTestMethod 'test_close'>}
firstresult = False

    def _multicall(hook_impls, caller_kwargs, firstresult=False):
        """Execute a call into multiple python functions/methods and return the
        result(s).
    
        ``caller_kwargs`` comes from _HookCaller.__call__().
        """
        __tracebackhide__ = True
        results = []
        excinfo = None
        try:  # run impl and wrapper setup functions in a loop
            teardowns = []
            try:
                for hook_impl in reversed(hook_impls):
                    try:
                        args = [caller_kwargs[argname] for argname in hook_impl.argnames]
                    except KeyError:
                        for argname in hook_impl.argnames:
                            if argname not in caller_kwargs:
                                raise HookCallError(
                                    "hook call must provide argument %r" % (argname,)
                                )
    
                    if hook_impl.hookwrapper:
                        try:
                            gen = hook_impl.function(*args)
                            next(gen)  # first yield
                            teardowns.append(gen)
                        except StopIteration:
                            _raise_wrapfail(gen, "did not yield")
                    else:
>                       res = hook_impl.function(*args)

../_pytest/vendored_packages/pluggy/callers.py:187: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = <AppTestMethod 'test_creation'>, nextitem = <AppTestMethod 'test_close'>

    def pytest_runtest_teardown(item, nextitem):
        _update_current_test_var(item, "teardown")
>       item.session._setupstate.teardown_exact(item, nextitem)

../_pytest/runner.py:136: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.runner.SetupState object at 0x0000000148f632b8>
item = <AppTestMethod 'test_creation'>, nextitem = <AppTestMethod 'test_close'>

    def teardown_exact(self, item, nextitem):
        needed_collectors = nextitem and nextitem.listchain() or []
>       self._teardown_towards(needed_collectors)

../_pytest/runner.py:351: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.runner.SetupState object at 0x0000000148f632b8>
needed_collectors = [<Session 'build'>, <PyPyModule 'pypy/module/bz2/test/test_bz2_file.py'>, <AppClassCollector 'AppTestBZ2File'>, <AppClassInstance '()'>, <AppTestMethod 'test_close'>]

    def _teardown_towards(self, needed_collectors):
        exc = None
        while self.stack:
            if self.stack == needed_collectors[: len(self.stack)]:
                break
            try:
                self._pop_and_teardown()
            except TEST_OUTCOME:
                # XXX Only first exception will be seen by user,
                #     ideally all should be reported.
                if exc is None:
                    exc = sys.exc_info()
        if exc:
>           six.reraise(*exc)

../_pytest/runner.py:366: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.runner.SetupState object at 0x0000000148f632b8>
needed_collectors = [<Session 'build'>, <PyPyModule 'pypy/module/bz2/test/test_bz2_file.py'>, <AppClassCollector 'AppTestBZ2File'>, <AppClassInstance '()'>, <AppTestMethod 'test_close'>]

    def _teardown_towards(self, needed_collectors):
        exc = None
        while self.stack:
            if self.stack == needed_collectors[: len(self.stack)]:
                break
            try:
>               self._pop_and_teardown()

../_pytest/runner.py:359: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.runner.SetupState object at 0x0000000148f632b8>

    def _pop_and_teardown(self):
        colitem = self.stack.pop()
>       self._teardown_with_finalization(colitem)

../_pytest/runner.py:316: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.runner.SetupState object at 0x0000000148f632b8>
colitem = <AppTestMethod 'test_creation'>

    def _teardown_with_finalization(self, colitem):
>       self._callfinalizers(colitem)

../_pytest/runner.py:334: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.runner.SetupState object at 0x0000000148f632b8>
colitem = <AppTestMethod 'test_creation'>

    def _callfinalizers(self, colitem):
        finalizers = self._finalizers.pop(colitem, None)
        exc = None
        while finalizers:
            fin = finalizers.pop()
            try:
                fin()
            except TEST_OUTCOME:
                # XXX Only first exception will be seen by user,
                #     ideally all should be reported.
                if exc is None:
                    exc = sys.exc_info()
        if exc:
>           six.reraise(*exc)

../_pytest/runner.py:331: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.runner.SetupState object at 0x0000000148f632b8>
colitem = <AppTestMethod 'test_creation'>

    def _callfinalizers(self, colitem):
        finalizers = self._finalizers.pop(colitem, None)
        exc = None
        while finalizers:
            fin = finalizers.pop()
            try:
>               fin()

../_pytest/runner.py:324: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   return lambda: result(param_obj)

../_pytest/python.py:614: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.module.bz2.test.test_bz2_file.AppTestBZ2File instance at 0x0000000118dbc120>
fun = <bound method AppTestBZ2File.test_creation of <pypy.module.bz2.test.test_bz2_file.AppTestBZ2File instance at 0x0000000118dbc120>>

    def teardown_method(self, fun):
        from rpython.rtyper.lltypesystem import ll2ctypes
        import gc
        tries = 20
        # remove the GC strings from ll2ctypes
        for key, value in ll2ctypes.ALLOCATED.items():
            if value._TYPE._gckind == 'gc':
                del ll2ctypes.ALLOCATED[key]
        #
        while tries and ll2ctypes.ALLOCATED:
            gc.collect() # to make sure we disallocate buffers
            self.space.getexecutioncontext()._run_finalizers_now()
            tries -= 1
>       assert not ll2ctypes.ALLOCATED
E       AssertionError

module/bz2/test/support.py:15: AssertionError
builder: own-macos-arm64 build #1214+
test: pypy/module/bz2/test/test_bz2_file.py::AppTestBZ2File::()::test_creation