Files
displayarray/tests_interactive/test_pub_cam.py
2018-03-14 16:35:18 -07:00

21 lines
559 B
Python

from cv_pubsubs import webcam_pub as w
import unittest as ut
class TestFrameHandler(ut.TestCase):
i = 0
def test_handler(self):
def test_frame_handler(frame, cam_id):
if self.i == 200:
w.CamCtrl.stop_cam(cam_id)
if self.i % 100 == 0:
print(frame.shape)
self.i += 1
w.frame_handler_thread(0, test_frame_handler,
request_size=(1280, 720),
high_speed=True,
fps_limit=240)