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

pytest_namespace removed from pytest since 4.0 #2938

Open
arunisaac opened this issue Mar 28, 2020 · 0 comments
Open

pytest_namespace removed from pytest since 4.0 #2938

arunisaac opened this issue Mar 28, 2020 · 0 comments

Comments

@arunisaac
Copy link

pytest_namespace has been removed from pytest since 4.0. See https://docs.pytest.org/en/latest/deprecations.html#pytest-namespace This causes the tests to fail with the following error.

============================= test session starts ==============================
platform linux -- Python 3.7.4, pytest-4.4.2, py-1.8.0, pluggy-0.11.0
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/tmp/guix-build-unknown-horizons-2019.1.drv-0/unknown-horizons-2019.1/.hypothesis/examples')
rootdir: /tmp/guix-build-unknown-horizons-2019.1.drv-0/unknown-horizons-2019.1
plugins: hypothesis-4.18.3, mock-1.10.1
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/gnu/store/wrllykvq4l9ia5wldivmdlwgf2c8m2mb-python-pytest-4.4.2/lib/python3.7/site-packages/_pytest/main.py", line 209, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/gnu/store/wrllykvq4l9ia5wldivmdlwgf2c8m2mb-python-pytest-4.4.2/lib/python3.7/site-packages/_pytest/main.py", line 248, in _main
INTERNALERROR>     config.hook.pytest_collection(session=session)
INTERNALERROR>   File "/gnu/store/w80vzg9kysnk379pn71b7pgn6l2jr6dx-python-pluggy-0.11.0/lib/python3.7/site-packages/pluggy/hooks.py", line 289, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/gnu/store/w80vzg9kysnk379pn71b7pgn6l2jr6dx-python-pluggy-0.11.0/lib/python3.7/site-packages/pluggy/manager.py", line 68, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/gnu/store/w80vzg9kysnk379pn71b7pgn6l2jr6dx-python-pluggy-0.11.0/lib/python3.7/site-packages/pluggy/manager.py", line 62, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/gnu/store/w80vzg9kysnk379pn71b7pgn6l2jr6dx-python-pluggy-0.11.0/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/gnu/store/w80vzg9kysnk379pn71b7pgn6l2jr6dx-python-pluggy-0.11.0/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/gnu/store/w80vzg9kysnk379pn71b7pgn6l2jr6dx-python-pluggy-0.11.0/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/gnu/store/wrllykvq4l9ia5wldivmdlwgf2c8m2mb-python-pytest-4.4.2/lib/python3.7/site-packages/_pytest/main.py", line 258, in pytest_collection
INTERNALERROR>     return session.perform_collect()
INTERNALERROR>   File "/gnu/store/wrllykvq4l9ia5wldivmdlwgf2c8m2mb-python-pytest-4.4.2/lib/python3.7/site-packages/_pytest/main.py", line 495, in perform_collect
INTERNALERROR>     self.config.pluginmanager.check_pending()
INTERNALERROR>   File "/gnu/store/w80vzg9kysnk379pn71b7pgn6l2jr6dx-python-pluggy-0.11.0/lib/python3.7/site-packages/pluggy/manager.py", line 251, in check_pending
INTERNALERROR>     % (name, hookimpl.plugin),
INTERNALERROR> pluggy.manager.PluginValidationError: unknown hook 'pytest_namespace' in plugin <module 'tests.conftest' from '/tmp/guix-build-unknown-horizons-2019.1.drv-0/unknown-horizons-2019.1/tests/conftest.py'>

========================= 3 warnings in 43.61 seconds ==========================
command "pytest" "tests" failed with status 3

Some refactoring maybe in order. Thank you!

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

No branches or pull requests

1 participant