()
Test the class ReadFromWebcam
Test the class ReadFromWebcam
Test the class ReadFromWebcam
def test_ReadFromWebcam():
    ''' Test the class ReadFromWebcam '''
    webcam_reader = ReadFromWebcam(max_framerate=10)
    img_displayer = ImageDisplayer()
    import itertools
    for i in itertools.count():
        img = webcam_reader.read_image()
        if img is None:
            break
        print(f"Read {i}th image...")
        img_displayer.display(img)
    print("Program ends")
def test_ReadFromWebcam ( ) : webcam_reader = ReadFromWebcam ( max_framerate = 10 ) img_displayer = ImageDisplayer ( ) import itertools for i in itertools . count ( ) : img = webcam_reader . read_image ( ) if img is None : break print ( f"Read {i}th image..." ) img_displayer . display ( img ) print ( "Program ends" )