-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Deprecate "pytest_funcarg__" prefix for fixtures #1684
Comments
cc @obestwalter |
Not sure if it's worth, as keeping support for this old form is simple enough too |
i want to see this removed :) it complicates things as its not sanely layered |
It's not explicitly deprecated yet. Shall we add a deprecation warning before 3.0? I just grepped through the code and there are loads of tests using it. Updating those tests to use the fixture decorator would be a nice low hanging fruit task. |
OK, I think we should introduce a deprecation warning for 3.0 then. Added it to the Wiki. |
done in #1714 |
For pytest_funcargs__, what is the alternative approach? Since some legacy code have this and I'm new to py.test. |
Just replace this: def pytest_funcargs__hello():
... with: @pytest.fixture
def hello():
... 😉 |
Warning below was fixed in pytest-cov 2.3.1: see details on pytest-dev/pytest#1684 pytest_funcarg__cov: declaring fixtures using "pytest_funcarg__" prefix is deprecated and scheduled to be removed in pytest 4.0. Please remove the prefix and use the @pytest.fixture decorator instead. Change-Id: Id8565778485eb502ef72b0635dfa222532de8dc6
Start to issue deprecation warnings when fixtures are declared using this legacy idiom, to be removed at some point later in time.
The text was updated successfully, but these errors were encountered: