Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-romero committed Nov 18, 2024
1 parent 0fa670e commit 89715bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_framegrab_with_hls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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"""
Expand Down

0 comments on commit 89715bc

Please sign in to comment.