Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work on pytest 6. #38

Open
proofit404 opened this issue Oct 29, 2020 · 2 comments
Open

Does not work on pytest 6. #38

proofit404 opened this issue Oct 29, 2020 · 2 comments
Assignees
Labels

Comments

@proofit404
Copy link

Instead of report summary it produce strange traceback with pytest internals.

memoryleak run-test: commands[0] | python3.8d -m pytest -c /dev/null --leaks=:
============================================================================ test session starts ============================================================================
platform linux -- Python 3.8.5, pytest-6.1.2, py-1.9.0, pluggy-0.13.1
cachedir: .tox/memoryleak/.pytest_cache
rootdir: /home/proofit404/data/generics, configfile: ../../../../dev/null
plugins: leaks-0.3.1
collected 155 items

tests/test_configuration.py LFEEEEEEEEEFEEEEEEEEEEEEEEEEEE                                                                                                            [ 19%]
tests/test_dependencies.py EEEEE                                                                                                                                      [ 22%]
tests/test_private.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE                        [100%]Traceback (most recent call last):
  File "/home/proofit404/.pyenv/versions/3.8.5-debug/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/proofit404/.pyenv/versions/3.8.5-debug/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/pytest/__main__.py", line 5, in <module>
    raise SystemExit(pytest.console_main())
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/_pytest/config/__init__.py", line 187, in console_main
    code = main()
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/_pytest/config/__init__.py", line 164, in main
    ret = config.hook.pytest_cmdline_main(
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/pluggy/manager.py", line 84, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/_pytest/main.py", line 306, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/_pytest/main.py", line 294, in wrap_session
    config.hook.pytest_sessionfinish(
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/pluggy/manager.py", line 84, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/_pytest/terminal.py", line 794, in pytest_sessionfinish
    outcome.get_result()
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/_pytest/runner.py", line 104, in pytest_sessionfinish
    session._setupstate.teardown_all()
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/_pytest/runner.py", line 413, in teardown_all
    self._teardown_with_finalization(key)
  File "/home/proofit404/data/generics/.tox/memoryleak/lib/python3.8/site-packages/_pytest/runner.py", line 407, in _teardown_with_finalization
    assert colitem in self.stack
AssertionError
@abalkin abalkin self-assigned this Oct 29, 2020
@abalkin abalkin added the bug label Oct 29, 2020
@jdavid
Copy link

jdavid commented Jun 15, 2021

I've used pytest-leaks with pytest 6.2.4 and didn't see this error (it worked fine, except for issue #36)

@seberg
Copy link
Collaborator

seberg commented Dec 13, 2021

Hmm, I just realized that I am still using pytest 5.4 because of these difficulties. We may have to look into fixing things up for pytest 7, I guess (I don't care about compat with all versions, so long I can run it over the numpy test suite just fine every half year).

(I realizes that "we may have to look into", probably means that I should try to do that...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants