Skip to content

Commit e0341ff

Browse files
committed
Fix python 2.7 compatibility
1 parent e26c58e commit e0341ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytest_reportportal/service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ def _process_test_case_id(self, leaf):
570570
:param leaf: item context
571571
:return: Test Case ID string
572572
"""
573-
tc_ids = [m.name == 'tc_id' for m in leaf['item'].iter_markers()]
573+
tc_ids = [m for m in leaf['item'].iter_markers() if m.name == 'tc_id']
574574
if len(tc_ids) > 0:
575575
return self._get_test_case_id(tc_ids[0], leaf)
576576
return self._get_test_case_id(None, leaf)
@@ -582,7 +582,7 @@ def _process_issue(self, item):
582582
:param item: Pytest.Item
583583
:return: Issue
584584
"""
585-
issues = [m.name == 'issue' for m in item.iter_markers()]
585+
issues = [m for m in item.iter_markers() if m.name == 'issue']
586586
if len(issues) > 0:
587587
return self._get_issue(issues[0])
588588

0 commit comments

Comments
 (0)