Skip to content

Commit aec1b7f

Browse files
turturicaturturica
authored andcommitted
Include a marker value, if present, when tagging tests.
1 parent 93863b8 commit aec1b7f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pytest_reportportal/service.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,13 @@ def _get_item_dirs(item):
407407
def _get_item_tags(self, item):
408408
# Try to extract names of @pytest.mark.* decorators used for test item
409409
# and exclude those which present in rp_ignore_tags parameter
410-
#return [k for k in item.keywords if item.get_marker(k) is not None
411-
# and k not in self.ignored_tags]
412-
tags = [k for k in item.keywords if item.get_marker(k) is not None
410+
def get_marker_value(item, keyword):
411+
marker = item.keywords.get(keyword)
412+
return "{}:{}".format(keyword, marker.args[0]) \
413+
if marker and marker.args else keyword
414+
415+
tags = [get_marker_value(item, k) for k in item.keywords
416+
if item.get_marker(k) is not None
413417
and k not in self.ignored_tags]
414418
tags.extend(item.session.config.getini('rp_tests_tags'))
415419

0 commit comments

Comments
 (0)