From 946b49ffd3e47deb7d372e0a68c0bf30590eabf3 Mon Sep 17 00:00:00 2001 From: Stefan Tolksdorf Date: Wed, 27 Sep 2023 18:28:44 +0200 Subject: [PATCH] Add test for get_current_version --- tests/version/commands/test_java.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/version/commands/test_java.py b/tests/version/commands/test_java.py index 5b25661b6..9685e8018 100644 --- a/tests/version/commands/test_java.py +++ b/tests/version/commands/test_java.py @@ -49,6 +49,10 @@ def test_getting_version(self): version_file_path.write_text( TEMPLATE_UPGRADE_VERSION_JSON, encoding="utf-8" ) + readme_file_path = Path("README.md") + readme_file_path.write_text( + TEMPLATE_UPGRADE_VERSION_MARKDOWN, encoding="utf-8" + ) result_version = JavaVersionCommand( SemanticVersioningScheme @@ -57,4 +61,6 @@ def test_getting_version(self): self.assertEqual( result_version, SemanticVersioningScheme.parse_version("2023.9.3") ) + version_file_path.unlink() + readme_file_path.unlink()