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

PytestDeprecationWarning: direct construction of Function has been deprecated #151

Closed
atemate opened this issue Apr 1, 2020 · 1 comment

Comments

@atemate
Copy link

atemate commented Apr 1, 2020

pytest-asyncio==0.10.0
pytest>=5.4.1 (working OK with pytest==5.3.5)

____________________________________________________________________________________ ERROR collecting tests/unit/test_test.py _____________________________________________________________________________________
venv/lib/python3.7/site-packages/pluggy/hooks.py:286: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
venv/lib/python3.7/site-packages/pluggy/manager.py:93: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
venv/lib/python3.7/site-packages/pluggy/manager.py:87: in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
venv/lib/python3.7/site-packages/_pytest/python.py:216: in pytest_pycollect_makeitem
    res = outcome.get_result()
venv/lib/python3.7/site-packages/pytest_asyncio/plugin.py:39: in pytest_pycollect_makeitem
    item = pytest.Function(name, parent=collector)
venv/lib/python3.7/site-packages/_pytest/nodes.py:83: in __call__
    warnings.warn(NODE_USE_FROM_PARENT.format(name=self.__name__), stacklevel=2)
E   pytest.PytestDeprecationWarning: direct construction of Function has been deprecated, please use Function.from_parent
@simonfagerholm
Copy link
Contributor

simonfagerholm commented Apr 1, 2020

@YArtem Already fixed in #142

@atemate atemate closed this as completed Apr 1, 2020
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

2 participants