diff --git a/test/test_framegrab_with_hls.py b/test/test_framegrab_with_hls.py index d0a1451..437365d 100644 --- a/test/test_framegrab_with_hls.py +++ b/test/test_framegrab_with_hls.py @@ -32,6 +32,8 @@ def test_grab_frame_success(self, mock_cv2): mock_cv2.assert_called_once_with("http://example.com/stream.m3u8") mock_capture.read.assert_called_once() self.assertEqual(frame.shape, (480, 640, 3)) + + grabber.release() mock_capture.release.assert_called_once() def test_init_without_hls_url(self): @@ -70,8 +72,6 @@ def test_grab_frame_failure(self, mock_cv2): with self.assertRaises(Exception): grabber.grab() - mock_capture.release.assert_called_once() - @patch("cv2.VideoCapture") def test_invalid_resolution_option(self, mock_cv2): """Test that setting resolution raises an error"""