issue1625, rename getfuncargvalue to getfixturevalue#1626
issue1625, rename getfuncargvalue to getfixturevalue#1626nicoddemus merged 1 commit intopytest-dev:masterfrom
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.
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.
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.
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.