From 188fd4a99b6a2bfbf6644fe30f099a565a3718fc Mon Sep 17 00:00:00 2001 From: Stefan Tolksdorf Date: Thu, 28 Sep 2023 11:23:02 +0200 Subject: [PATCH] Add test for get_current_version --- pontos/version/commands/_java.py | 2 +- tests/version/commands/test_java.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pontos/version/commands/_java.py b/pontos/version/commands/_java.py index 7d00a09af..379c7e071 100644 --- a/pontos/version/commands/_java.py +++ b/pontos/version/commands/_java.py @@ -105,7 +105,7 @@ def _update_version_files(self, new_version) -> List[Path]: ) content = "".join(lines) - with open(Path.cwd() / file_path, "w") as output_file_handle: + with (Path.cwd() / file_path).open("w") as output_file_handle: output_file_handle.write(content) changed_files.append(Path(file_config["path"])) return changed_files diff --git a/tests/version/commands/test_java.py b/tests/version/commands/test_java.py index 663a1f194..164bb2691 100644 --- a/tests/version/commands/test_java.py +++ b/tests/version/commands/test_java.py @@ -132,7 +132,7 @@ def test_verify_version(self): encoding="utf-8", ) properties_file_path = Path("src/application.properties") - properties_file_path.mkdir(parents=True, exist_ok=True) + Path("src").mkdir(parents=True, exist_ok=True) properties_file_path.write_text( TEMPLATE_UPGRADE_VERSION_WITH_VERSION_PROPERTIES.format( version