GitHub Actions Iterations

This commit is contained in:
Semantic Versioner 2023-07-22 05:11:51 -04:00
parent 8b214aab3d
commit 1138c97865
2 changed files with 1 additions and 4 deletions

View File

@ -136,7 +136,7 @@ class SemVer:
with open(file_path, "w") as file: with open(file_path, "w") as file:
file.write(filedata) file.write(filedata)
else: else:
logger.info( logger.warning(
f"Tried to version file: '{file_path}' but it doesn't exist!" f"Tried to version file: '{file_path}' but it doesn't exist!"
) )

View File

@ -67,7 +67,6 @@ class TestSemVer(unittest.TestCase):
@mock.patch("toml.load") @mock.patch("toml.load")
@mock.patch("pathlib.Path.is_file") @mock.patch("pathlib.Path.is_file")
@mock.patch("builtins.open", mock.mock_open()) @mock.patch("builtins.open", mock.mock_open())
@mock.patch("semver.logger.info")
def test_update_file_version( def test_update_file_version(
self, self,
mock_logger: mock.Mock, mock_logger: mock.Mock,
@ -83,11 +82,9 @@ class TestSemVer(unittest.TestCase):
} }
mock_path_is_file.return_value = True mock_path_is_file.return_value = True
self.semver._update_file_version("1.0.1", "1.0.0") self.semver._update_file_version("1.0.1", "1.0.0")
mock_logger.assert_not_called()
mock_path_is_file.return_value = False mock_path_is_file.return_value = False
self.semver._update_file_version("1.0.1", "1.0.0") self.semver._update_file_version("1.0.1", "1.0.0")
mock_logger.assert_called_once()
@mock.patch("semver.semver.SemVer._version_repo", mock.MagicMock()) @mock.patch("semver.semver.SemVer._version_repo", mock.MagicMock())
def test_run_ok(self): def test_run_ok(self):