allankp / pytest-testrail

pytest plugin for integration with TestRail, for creating testruns and updating results
MIT License
96 stars 124 forks source link

Not working with Pytest 4.0+ #93

Closed amsun10 closed 5 years ago

amsun10 commented 5 years ago

**Describe

the bug** When running in pytest 4.0.0+, it shows:

collecting ... INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/pytest-4.0.2-py3.7.egg/_pytest/main.py", line 185, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/pytest-4.0.2-py3.7.egg/_pytest/main.py", line 224, in _main INTERNALERROR> config.hook.pytest_collection(session=session) INTERNALERROR> File "/home/mtc/.local/lib/python3.7/site-packages/pluggy/hooks.py", line 289, in call INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "/home/mtc/.local/lib/python3.7/site-packages/pluggy/manager.py", line 68, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "/home/mtc/.local/lib/python3.7/site-packages/pluggy/manager.py", line 62, in INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, INTERNALERROR> File "/home/mtc/.local/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/home/mtc/.local/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/home/mtc/.local/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(args) INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/pytest-4.0.2-py3.7.egg/_pytest/main.py", line 234, in pytest_collection INTERNALERROR> return session.perform_collect() INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/pytest-4.0.2-py3.7.egg/_pytest/main.py", line 450, in perform_collect INTERNALERROR> session=self, config=self.config, items=items INTERNALERROR> File "/home/mtc/.local/lib/python3.7/site-packages/pluggy/hooks.py", line 289, in call INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "/home/mtc/.local/lib/python3.7/site-packages/pluggy/manager.py", line 68, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "/home/mtc/.local/lib/python3.7/site-packages/pluggy/manager.py", line 62, in INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, INTERNALERROR> File "/home/mtc/.local/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/home/mtc/.local/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/home/mtc/.local/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(args) INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/pytest_testrail-2.3.1-py3.7.egg/pytest_testrail/plugin.py", line 152, in pytest_collection_modifyitems INTERNALERROR> items_with_tr_keys = get_testrail_keys(items) INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/pytest_testrail-2.3.1-py3.7.egg/pytest_testrail/plugin.py", line 112, in get_testrail_keys INTERNALERROR> item.get_marker(TESTRAIL_PREFIX).kwargs.get('ids') INTERNALERROR> File "/usr/local/lib/python3.7/dist-packages/pytest-4.0.2-py3.7.egg/_pytest/mark/structures.py", line 25, in warned INTERNALERROR> warnings.warn(warning, stacklevel=2) INTERNALERROR> _pytest.warning_types.RemovedInPytest4Warning: MarkInfo objects are deprecated as they contain merged marks which are hard to deal with correctly. INTERNALERROR> Please use node.get_closest_marker(name) or node.iter_markers(name). INTERNALERROR> Docs: https://docs.pytest.org/en/latest/mark.html#updating-code

To Reproduce Run with pytest 4.0+

Expected behavior A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

apallier commented 5 years ago

Hi @amsun10, please could you check your plugin version? "pytest-testrail" is normally compatible with pytest 4+ since v2.3.2: https://github.com/allankp/pytest-testrail/releases/tag/v2.3.2

amsun10 commented 5 years ago

Thanks @apallier, I saw this already fixed in the latest version, thanks for replying me