File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 44import pytest
55
66from time import time
7- from six import with_metaclass
7+ from six import with_metaclass , iteritems
88from six .moves import queue
99
1010from reportportal_client import ReportPortalServiceAsync
@@ -111,13 +111,16 @@ def _get_tags(self, test_item):
111111 # try to extract names of @pytest.mark.* decorators used for test item
112112 # and exclude those which present in rp_ignore_tags parameter
113113 mark_plugin = test_item .config .pluginmanager .getplugin ('mark' )
114- if mark_plugin :
115- keywords = test_item .keywords
116- marks = mark_plugin .MarkMapping (keywords )._mymarks
117- return [m for m in marks if m not in self .ignored_tags ]
118- else :
114+ if not mark_plugin :
119115 return []
120116
117+ mark_names = set ()
118+ for key , value in iteritems (test_item .keywords ):
119+ if (isinstance (value , mark_plugin .MarkInfo ) or
120+ isinstance (value , mark_plugin .MarkDecorator )):
121+ mark_names .add (key )
122+ return [m for m in mark_names if m not in self .ignored_tags ]
123+
121124 def finish_pytest_item (self , status , issue = None ):
122125 self ._stop_if_necessary ()
123126 if self .RP is None :
You can’t perform that action at this time.
0 commit comments