-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
issue1625, rename getfuncargvalue to getfixturevalue #1626
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
issue1625, rename getfuncargvalue to getfixturevalue #1626
Conversation
e32b97c to
0c74f4b
Compare
CHANGELOG.rst
Outdated
| is specified on the command line together with the ``--pyargs`` | ||
| option. Thanks to `@taschini`_ for the PR (`#1597`_). | ||
|
|
||
| * Rename ``getfuncargvalue`` to ``getfixturevalue``. `getfuncargvalue` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably also use double-backticks with the second getfuncargvalue as well?
|
Might make sense to add a test for the old name as well - and a note in the doc somewhere, as well as a changelog entry? |
|
We had some discussion about skipping this renaming, if it is supposed to be deprecated later on altogether anyway?! (because fixture factories would be the recommended way) |
|
I think @hpk42 also mentioned it's kind of impossible to deprecate/remove it since there are valid usecases without alternatives, and I agree. Some examples:
|
0c74f4b to
d3a4b2a
Compare
d3a4b2a to
2e9b714
Compare
2e9b714 to
16838af
Compare
| """) | ||
|
|
||
| def test_getfuncargvalue_is_deprecated(request): | ||
| pytest.deprecated_call(request.getfuncargvalue, 'tmpdir') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason the code above passes, but this fails:
def test_getfuncargvalue_is_deprecated_with(request):
with pytest.deprecated_call():
request.getfuncargvalue('tmpdir')|
Fixes added:
|
|
@tomviner this one is in a conflicted state as well. 😁 |
16838af to
7cc1148
Compare
| *def arg1* | ||
| """) | ||
|
|
||
| class TestParameterizedSubRequest: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why were these tests removed?
7cc1148 to
3719e0c
Compare
3719e0c to
fda838b
Compare
|
@nicoddemus rebased |
|
Hmmm lots of breakage now 😬, would you take a look please? |
0645648 to
1f059c0
Compare
|
@nicoddemus this PR was still using the old method: |
getfuncargvalue was deprecated in pytest 3.0.0: * https://docs.pytest.org/en/latest/changelog.html?highlight=getfuncargvalue#id329 * pytest-dev/pytest#1626 The latest, which we use, is pytest 3.5.0.
Fix for #1625
getfuncargvaluewill be deprecated but will still be supported for the moment.