Skip to content

PytestDeprecationWarning: direct construction of Function has been deprecated #151

Closed
@atemate

Description

@atemate

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions