From 376c1b1b7d2f2e9caf3cf9f242eb3be83ba0b6bf Mon Sep 17 00:00:00 2001 From: Tiko Date: Wed, 3 Apr 2024 16:48:03 +0200 Subject: [PATCH] fix: fix regex --- README.md | 1 + pyproject.toml | 2 +- pytestomatio/testItem.py | 2 +- pytestomatio/testRunConfig.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1c2d979..9f05e94 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,7 @@ def test_example(): - Fix test duration - Require more back references from testomatio - pytest.skip should behave as @pytest.mark.skip +- Refactor test run and make run url available ## Contribution 1. `pip install -e .` diff --git a/pyproject.toml b/pyproject.toml index 3abd6e7..bff0401 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ version_provider = "pep621" update_changelog_on_bump = true [project] name = "pytestomatio" -version = "2.3.2" +version = "2.2.0" dependencies = [ "requests>=2.29.0", diff --git a/pytestomatio/testItem.py b/pytestomatio/testItem.py index 5415349..b9655cc 100644 --- a/pytestomatio/testItem.py +++ b/pytestomatio/testItem.py @@ -138,7 +138,7 @@ def repl(match): else: string_value = 'Unsupported type' # TODO: handle "value with space" on testomatio BE https://github.com/testomatio/check-tests/issues/147 - return sub("[\.\s]", "_", string_value) # Temporary fix for spaces in parameter values + return sub(r"[\.\s]", "_", string_value) # Temporary fix for spaces in parameter values test_name = sub(pattern, repl, sync_title) return test_name \ No newline at end of file diff --git a/pytestomatio/testRunConfig.py b/pytestomatio/testRunConfig.py index b39329e..630c1ef 100644 --- a/pytestomatio/testRunConfig.py +++ b/pytestomatio/testRunConfig.py @@ -45,4 +45,4 @@ def set_env(self, env: str) -> None: def safe_string_list(self, param: str): if not param: return None - return ",".join([sub("\s", "", part) for part in param.split(',')]) + return ",".join([sub(r"\s", "", part) for part in param.split(',')])