From 2f92e9d06940bf0cb5aaea9089e998f15befc36a Mon Sep 17 00:00:00 2001 From: Dmitrii Gridnev Date: Fri, 2 Aug 2024 14:40:16 +0200 Subject: [PATCH] fix: an issue with `qase-pytest-capture-logs` parameter Fixed an issue then `qase-pytest-capture-logs` parameter did set correct value. Fix #234 --- qase-pytest/changelog.md | 6 ++++++ qase-pytest/pyproject.toml | 2 +- qase-pytest/src/qase/pytest/conftest.py | 6 +++--- qase-pytest/src/qase/pytest/options.py | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/qase-pytest/changelog.md b/qase-pytest/changelog.md index 5cba38b..064e84e 100644 --- a/qase-pytest/changelog.md +++ b/qase-pytest/changelog.md @@ -1,3 +1,9 @@ +# qase-pytest 6.1.0b3 + +## What's new + +Fixed an issue then `qase-pytest-capture-logs` parameter did set correct value. + # qase-pytest 6.1.0b2 ## What's new diff --git a/qase-pytest/pyproject.toml b/qase-pytest/pyproject.toml index f92ade1..8e71c97 100644 --- a/qase-pytest/pyproject.toml +++ b/qase-pytest/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "qase-pytest" -version = "6.1.0b2" +version = "6.1.0b3" description = "Qase Pytest Plugin for Qase TestOps and Qase Report" readme = "README.md" keywords = ["qase", "pytest", "plugin", "testops", "report", "qase reporting", "test observability"] diff --git a/qase-pytest/src/qase/pytest/conftest.py b/qase-pytest/src/qase/pytest/conftest.py index 301885c..20edce7 100644 --- a/qase-pytest/src/qase/pytest/conftest.py +++ b/qase-pytest/src/qase/pytest/conftest.py @@ -79,10 +79,10 @@ def setup_config_manager(config): config_manager.config.testops.api.set_host(config.option.__dict__[option]) if option == "qase_testops_plan_id" and config.option.__dict__[option] is not None: - config_manager.config.testops.plan.set_id(config.option.__dict__[option]) + config_manager.config.testops.plan.set_id(int(config.option.__dict__[option])) if option == "qase_testops_run_id" and config.option.__dict__[option] is not None: - config_manager.config.testops.run.set_id(config.option.__dict__[option]) + config_manager.config.testops.run.set_id(int(config.option.__dict__[option])) if option == "qase_testops_run_title" and config.option.__dict__[option] is not None: config_manager.config.testops.run.set_title(config.option.__dict__[option]) @@ -109,7 +109,7 @@ def setup_config_manager(config): config_manager.config.testops.batch.set_size(int(config.option.__dict__[option])) if option == "qase_pytest_capture_logs" and config.option.__dict__[option] is not None: - config_manager.config.pytest.set_capture_logs(config.option.__dict__[option]) + config_manager.config.framework.pytest.set_capture_logs(config.option.__dict__[option]) return config_manager diff --git a/qase-pytest/src/qase/pytest/options.py b/qase-pytest/src/qase/pytest/options.py index b38b2fc..46e9b36 100644 --- a/qase-pytest/src/qase/pytest/options.py +++ b/qase-pytest/src/qase/pytest/options.py @@ -170,7 +170,7 @@ def addoptions(parser, group): parser, group, "--qase-pytest-capture-logs", - dest="qase-pytest-capture-logs", + dest="qase_pytest_capture_logs", type="bool", help="Capture logs from pytest" )