Skip to content

Commit

Permalink
Replace item.get_marker with item.get_closest_marker as it was remove…
Browse files Browse the repository at this point in the history
…d upstream as mentioned here: pytest-dev/pytest#4606 (comment)

Quoted here incase that link breaks in the future:
        "We have removed item.get_marker, users should use item.get_closest_marker now
        (it's a long history, this was not an arbitrary change). Indeed I suspect
        pytest-cov might need to be updated."

item.get_marker was removed in this PR pytest-dev/pytest#4564
  • Loading branch information
kaiwalyajoshi committed Feb 21, 2019
1 parent 60e9caf commit 50e7ac1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testing/sdk_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def your_test_here(): ...
In order for this annotation to take effect, this function must be called by a pytest_runtest_setup() hook.
"""
min_version_mark = item.get_marker("dcos_min_version")
min_version_mark = item.get_closest_marker("dcos_min_version")
if min_version_mark:
min_version = min_version_mark.args[0]
message = "Feature only supported in DC/OS {} and up".format(min_version)
Expand Down

0 comments on commit 50e7ac1

Please sign in to comment.