From bb82d04e3f228919c566272664f6da32b515d906 Mon Sep 17 00:00:00 2001 From: Pietro Pasotti Date: Wed, 29 Nov 2023 13:29:29 +0100 Subject: [PATCH] strip .git extension if provided in repo --- interface_tester/plugin.py | 3 +++ pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/interface_tester/plugin.py b/interface_tester/plugin.py index a2f9d43..80ac2cd 100644 --- a/interface_tester/plugin.py +++ b/interface_tester/plugin.py @@ -188,6 +188,9 @@ def _collect_interface_test_specs(self) -> InterfaceTestSpec: ) repo_name = self._repo.split("/")[-1] + if repo_name.endswith(".git"): + repo_name = repo_name.rsplit(".", maxsplit=1)[0] + intf_spec_path = ( Path(tempdir) / repo_name diff --git a/pyproject.toml b/pyproject.toml index 5bc903a..c9cc7c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ build-backend = "setuptools.build_meta" [project] name = "pytest-interface-tester" -version = "1.0.4" +version = "1.0.5" authors = [ { name = "Pietro Pasotti", email = "pietro.pasotti@canonical.com" }, ]