diff --git a/CHANGELOG.md b/CHANGELOG.md index bd0de8e..de69aa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,14 @@ # Changelog ## [Unreleased] +### Fixed +- Issue [#362](https://github.com/reportportal/agent-python-pytest/issues/362): Debug mode passing, by @HardNorth + +## [5.4.0] ### Added - Pytest version >= 8 support, by @HardNorth ### Removed -- `Packege` and `Dir` item types processing on test collection. This is done to preserve backward compatibility and improve name consistency, by @HardNorth +- `Package` and `Dir` item types processing on test collection. This is done to preserve backward compatibility and improve name consistency, by @HardNorth ### Changed - `rp_issue_system_url` renamed to `rp_bts_issue_url` to be consistent with other agents, by @HardNorth diff --git a/pytest_reportportal/service.py b/pytest_reportportal/service.py index bb43282..c74cf0e 100644 --- a/pytest_reportportal/service.py +++ b/pytest_reportportal/service.py @@ -32,6 +32,7 @@ from .config import AgentConfig try: + # noinspection PyProtectedMember from pytest import Instance except ImportError: # in pytest >= 7.0 this type was removed @@ -196,7 +197,6 @@ def _build_start_launch_rq(self): 'name': self._config.rp_launch, 'start_time': timestamp(), 'description': self._config.rp_launch_description, - 'mode': self._config.rp_mode, 'rerun': self._config.rp_rerun, 'rerun_of': self._config.rp_rerun_of } @@ -897,7 +897,8 @@ def start(self) -> None: log_batch_payload_size=self._config.rp_log_batch_payload_size, launch_uuid_print=self._config.rp_launch_uuid_print, print_output=self._config.rp_launch_uuid_print_output, - http_timeout=self._config.rp_http_timeout + http_timeout=self._config.rp_http_timeout, + mode=self._config.rp_mode ) if hasattr(self.rp, "get_project_settings"): self.project_settings = self.rp.get_project_settings() diff --git a/setup.py b/setup.py index 51efcf9..3251736 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ from setuptools import setup -__version__ = '5.4.0' +__version__ = '5.4.1' def read_file(fname): diff --git a/tests/integration/test_debug_mode.py b/tests/integration/test_debug_mode.py index 229152b..434f6cc 100644 --- a/tests/integration/test_debug_mode.py +++ b/tests/integration/test_debug_mode.py @@ -40,10 +40,8 @@ def test_launch_mode(mock_client_init, mode, expected_mode): variables=variables) assert int(result) == 0, 'Exit code should be 0 (no errors)' - mock_client = mock_client_init.return_value - assert mock_client.start_launch.call_count == 1, \ - '"start_launch" method was not called' + assert mock_client_init.call_count == 1, "client wasn't initialized" - call_args = mock_client.start_launch.call_args_list - start_launch_kwargs = call_args[0][1] - assert start_launch_kwargs['mode'] == expected_mode + init_kwargs = mock_client_init.call_args_list[0][1] + assert 'mode' in init_kwargs + assert init_kwargs['mode'] == expected_mode