Skip to content

Commit 7b2d03e

Browse files
authored
Merge pull request #330 from reportportal/develop
Release
2 parents 875e344 + e0341ff commit 7b2d03e

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ jobs:
8787
mv ${{ env.CHANGE_LOG_FILE }}${{ env.TMP_SUFFIX }} ${{ env.CHANGE_LOG_FILE }}
8888
git add ${{ env.CHANGE_LOG_FILE }}
8989
git commit -m "Changelog update"
90+
git push
9091
9192
- name: Read changelog Entry
9293
id: readChangelogEntry

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44
### Added
5+
- Support of runtime issue adding, by @HardNorth
6+
7+
## [5.1.4]
8+
### Added
59
- Feature [#325](https://github.com/reportportal/agent-python-pytest/issues/325) Support of runtime attribute adding, by @yakovbabich, @HardNorth
610
- `rp_launch_timeout` parameter to limit test execution in case of process hanging, by @HardNorth
711

pytest_reportportal/service.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -570,10 +570,9 @@ def _process_test_case_id(self, leaf):
570570
:param leaf: item context
571571
:return: Test Case ID string
572572
"""
573-
for marker in leaf['item'].iter_markers():
574-
if marker.name == 'tc_id':
575-
return self._get_test_case_id(marker, leaf)
576-
573+
tc_ids = [m for m in leaf['item'].iter_markers() if m.name == 'tc_id']
574+
if len(tc_ids) > 0:
575+
return self._get_test_case_id(tc_ids[0], leaf)
577576
return self._get_test_case_id(None, leaf)
578577

579578
def _process_issue(self, item):
@@ -583,9 +582,9 @@ def _process_issue(self, item):
583582
:param item: Pytest.Item
584583
:return: Issue
585584
"""
586-
for marker in item.iter_markers():
587-
if marker.name == 'issue':
588-
return self._get_issue(marker)
585+
issues = [m for m in item.iter_markers() if m.name == 'issue']
586+
if len(issues) > 0:
587+
return self._get_issue(issues[0])
589588

590589
def _process_attributes(self, item):
591590
"""
@@ -631,7 +630,9 @@ def _process_metadata_item_finish(self, leaf):
631630
632631
:param leaf: item context
633632
"""
634-
leaf['attributes'] = self._process_attributes(leaf['item'])
633+
item = leaf['item']
634+
leaf['attributes'] = self._process_attributes(item)
635+
leaf['issue'] = self._process_issue(item)
635636

636637
def _build_start_step_rq(self, leaf):
637638
payload = {

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from setuptools import setup
66

77

8-
__version__ = '5.1.4'
8+
__version__ = '5.1.5'
99

1010

1111
def read_file(fname):

0 commit comments

Comments
 (0)