pytest-httpretty icon indicating copy to clipboard operation
pytest-httpretty copied to clipboard

use `get_closest_marker` instead of `get_marker`

Open Nicusor97 opened this issue 6 years ago • 3 comments

In the latest version of pytest was removed the get_marker method .

#4546: Remove Node.get_marker(name) the return value was not usable for more than a existence check.

Use Node.get_closest_marker(name) as a replacement. Link to the pytest changelog : https://docs.pytest.org/en/latest/changelog.html

Nicusor97 avatar Jan 07 '19 14:01 Nicusor97

Would that also be compatible with older versions of pytest?

gillesdouaire avatar Jan 07 '19 17:01 gillesdouaire

hmm , you are right ! It should be compatible with all pytest versions and If I will make some changes , it should be compatible . Wait until I will push a new commit

Nicusor97 avatar Jan 07 '19 17:01 Nicusor97

Now , this module will be compatible with all pytest version ! Thanks @gillesdouaire .

Nicusor97 avatar Jan 08 '19 07:01 Nicusor97