This warning:
|
FILLFUNCARGS = PytestDeprecationWarning( |
|
"The `_fillfuncargs` function is deprecated, use " |
|
"function._request._fillfixtures() instead if you cannot avoid reaching into internals." |
|
) |
...is raised from:
|
def fillfixtures(function: "Function") -> None: |
|
"""Fill missing funcargs for a test function.""" |
|
warnings.warn(FILLFUNCARGS, stacklevel=2) |
...suggesting the former is wrong, and super confusing when you're trying to track down where a warning is coming from in a plugin.
Related: what is the public and approved way for pytest plugins to explicitly request fixtures now?
I do this dance currently, but I've always wished for something more pleasant:
https://github.com/cjw296/sybil/blob/734a5769af840e6bf03f84e4eea9f9ed2681c4bb/sybil/integration/pytest.py#L41-L75
This warning:
pytest/src/_pytest/deprecated.py
Lines 23 to 26 in cd67c2a
...is raised from:
pytest/src/_pytest/fixtures.py
Lines 342 to 344 in cd67c2a
...suggesting the former is wrong, and super confusing when you're trying to track down where a warning is coming from in a plugin.
Related: what is the public and approved way for pytest plugins to explicitly request fixtures now?
I do this dance currently, but I've always wished for something more pleasant:
https://github.com/cjw296/sybil/blob/734a5769af840e6bf03f84e4eea9f9ed2681c4bb/sybil/integration/pytest.py#L41-L75