Пример #1
0
def test_refresh_is_ready_to_sound():
    alarm = Alarm(frames_with_no_detections_threshold=5, melody='ring.mp3')
    alarm._is_ready_to_sound = False
    alarm._refresh()
    assert alarm._is_ready_to_sound == True
Пример #2
0
def test_refresh_frames_with_no_detections():
    alarm = Alarm(frames_with_no_detections_threshold=5, melody='ring.mp3')
    alarm._increment_frames_with_no_detections()
    alarm._refresh()
    assert alarm._frames_with_no_detections == 0