Skip to content

Commit 581f1cf

Browse files
committed
Fixed Agent crash in certain pytest-bdd cases
1 parent b56870b commit 581f1cf

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Changelog
22

33
## [Unreleased]
4+
### Fixed
5+
- Agent crash in certain `pytest-bdd` cases, by @HardNorth
46

57
## [5.6.3]
68
### Changed

pytest_reportportal/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ def post_log(
10941094
if PYTEST_BDD:
10951095
if not item_id:
10961096
# Check if we are actually a BDD scenario
1097-
scenario = self._bdd_scenario_by_item[test_item]
1097+
scenario = self._bdd_scenario_by_item.get(test_item, None)
10981098
if scenario:
10991099
# Yes, we are a BDD scenario, report log to the scenario
11001100
item_id = self._tree_path[scenario][-1]["item_id"]

0 commit comments

Comments
 (0)