测试正常版本号解析
(self, mock_file)
| 28 | |
| 29 | @patch("builtins.open", new_callable=mock_open, read_data="fastdeploy version: 1.0.0\nother info") |
| 30 | def test_normal_version(self, mock_file): |
| 31 | """测试正常版本号解析""" |
| 32 | self.assertEqual(current_package_version(), "1.0.0") |
| 33 | |
| 34 | @patch("builtins.open", side_effect=FileNotFoundError) |
| 35 | def test_file_not_found(self, mock_file): |
nothing calls this directly
no test coverage detected