jlaska / pytest-github

Plugin for py.test that associates tests with github issues using a marker
MIT License
18 stars 9 forks source link

MarkInfo objects will be removed in pytest 4 warning #14

Closed AlanCoding closed 6 years ago

AlanCoding commented 6 years ago

https://github.com/jlaska/pytest-github/blob/2683d0d58984a1ce638a6b64eaa77f2c68a3d9ee/pytest_github/plugin.py#L299-L304

15:50:35 /root/.venv/lib/python2.7/site-packages/pytest_github/plugin.py:304: RemovedInPytest4Warning: MarkInfo objects are deprecated as they contain merged marks which are hard to deal with correctly.
15:50:35 Please use node.get_closest_marker(name) or node.iter_markers(name).
15:50:35 Docs: https://docs.pytest.org/en/latest/mark.html#updating-code
15:50:35   issue_urls = tuple(sorted(set(marker.args)))  # (O_O) for caching

I guess this is fixed if we just use get_closest_marker???

marker = item.get_closest_marker('github')
kdelee commented 6 years ago

https://github.com/jlaska/pytest-github/pull/16 fixed this, it can be closed now