测试文件不存在的情况
(self, mock_file)
| 33 | |
| 34 | @patch("builtins.open", side_effect=FileNotFoundError) |
| 35 | def test_file_not_found(self, mock_file): |
| 36 | """测试文件不存在的情况""" |
| 37 | self.assertEqual(current_package_version(), "Unknown") |
| 38 | |
| 39 | @patch("builtins.open", new_callable=mock_open, read_data="some other content") |
| 40 | def test_no_version_line(self, mock_file): |
nothing calls this directly
no test coverage detected