Exemplo n.º 1
0
 def test_current_frame_does_not_block(self):
     c = Camera(4)
     start = perf_counter()
     c.current_frame()
     c.current_frame()
     end = perf_counter()
     self.assertTrue(end - start < 0.01)
Exemplo n.º 2
0
 def test_current_frame_opencv(self):
     c = Camera(4)
     frame = c.current_frame(format="OpenCV")
     self.assertIsInstance(frame, Mock)