コード例 #1
0
def test_frame_get_resized_next():
    """
    Checks to make sure resizing within get_next method is working.
    """
    passed = True
    feed = CameraFeed(0)
    try:
        feed.get_next(True, False)
    except AttributeError:
        # This means there was an error in the resize method of get__next()
        passed = False
    assert passed is True
コード例 #2
0
def test_frame_resize():
    """
    Checks to make sure resize of a frame is working correcly.
    """
    passed = True
    feed = CameraFeed(0)
    frame = feed.get_next(False, False)
    try:
        imutils.resize(frame, 400)
    except AttributeError:
        # This means there was an error in the resize method of get_next()
        passed = False
    assert passed is True