@pytest.fixture(scope='session')
def _app_release_list():
    apps = []
    (yield apps)
    gc.collect()
    alive_apps = []
    for (i, (app, request)) in enumerate(apps[:(- 1)]):
        app = app()
        request = request()
        if (request is None):
            request = '<dead request>'
        if (app is not None):
            alive_apps.append((app, request))
            logging.error(('Memory leak: failed to release app for test ' + repr(request)))
    assert (not alive_apps), 'Memory leak: failed to release all apps'
@pytest.fixture(scope='session')
def _app_release_list():
    apps = []
    (yield apps)
    gc.collect()
    alive_apps = []
    for (i, (app, request)) in enumerate(apps[:(- 1)]):
        app = app()
        request = request()
        if (request is None):
            request = '<dead request>'
        if (app is not None):
            alive_apps.append((app, request))
            logging.error(('Memory leak: failed to release app for test ' + repr(request)))
    assert (not alive_apps), 'Memory leak: failed to release all apps'