From 89715bcc72fbe4a0aa37cfb53e4e69b34e19bf0b Mon Sep 17 00:00:00 2001 From: Tyler Romero Date: Mon, 18 Nov 2024 14:05:24 -0800 Subject: [PATCH] Fix tests --- test/test_framegrab_with_hls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"""