Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

## [Unreleased]
### Fixed
- Agent crash in certain `pytest-bdd` cases, by @HardNorth

## [5.6.3]
### Changed
- Client version updated to [5.7.2](https://github.com/reportportal/client-Python/releases/tag/5.7.2), by @HardNorth
### Removed
Expand Down
6 changes: 2 additions & 4 deletions pytest_reportportal/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,9 +743,7 @@ def _get_parameters(self, item) -> Optional[dict[str, Any]]:
:return: dict of params
"""
params = item.callspec.params if hasattr(item, "callspec") else None
if not params:
return None
return {str(k): v.replace("\0", "\\0") if isinstance(v, str) else v for k, v in params.items()}
return params

def _get_parameters_indices(self, item) -> Optional[dict[str, Any]]:
"""
Expand Down Expand Up @@ -1096,7 +1094,7 @@ def post_log(
if PYTEST_BDD:
if not item_id:
# Check if we are actually a BDD scenario
scenario = self._bdd_scenario_by_item[test_item]
scenario = self._bdd_scenario_by_item.get(test_item, None)
if scenario:
# Yes, we are a BDD scenario, report log to the scenario
item_id = self._tree_path[scenario][-1]["item_id"]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from setuptools import setup

__version__ = "5.6.3"
__version__ = "5.6.4"


def read_file(fname):
Expand Down
2 changes: 0 additions & 2 deletions tests/integration/test_parameters_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import pytest

from examples.params.test_binary_symbol_in_parameters import BINARY_TEXT
from tests import REPORT_PORTAL_SERVICE
from tests.helpers import utils

Expand All @@ -32,7 +31,6 @@
"examples/params/test_different_parameter_types.py",
{"integer": 1, "floating_point": 1.5, "boolean": True, "none": None},
),
("examples/params/test_binary_symbol_in_parameters.py", {"text": BINARY_TEXT.replace("\0", "\\0")}),
],
)
def test_parameters(mock_client_init, test, expected_params):
Expand Down
Loading