Test when command fails
(self, mock_run)
| 71 | |
| 72 | @patch("fastdeploy.usage.usage_lib.subprocess.run") |
| 73 | def test_command_failure(self, mock_run): |
| 74 | """Test when command fails""" |
| 75 | mock_result = Mock() |
| 76 | mock_result.returncode = 1 |
| 77 | mock_result.stdout = "" |
| 78 | mock_run.return_value = mock_result |
| 79 | |
| 80 | result = get_xpu_model() |
| 81 | self.assertIsNone(result) |
| 82 | |
| 83 | @patch("fastdeploy.usage.usage_lib.subprocess.run") |
| 84 | def test_no_matching_pattern(self, mock_run): |
nothing calls this directly
no test coverage detected