MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / test_reader_set_frame

Function test_reader_set_frame

tests/test_video.py:64–72  ·  view source on GitHub ↗
(video_clip)

Source from the content-addressed store, hash-verified

62
63
64def test_reader_set_frame(video_clip):
65 with pytest.raises(ValueError):
66 video_clip.set_to_frame(-1)
67 video_clip.set_to_frame(2)
68 assert int(video_clip.video.get(POS_FRAMES)) == 2
69 video_clip.set_to_frame(len(video_clip) + 10)
70 assert int(video_clip.video.get(POS_FRAMES)) == len(video_clip) - 1
71 video_clip.reset()
72 assert int(video_clip.video.get(POS_FRAMES)) == 0
73
74
75@pytest.mark.parametrize("shrink, crop", [(1, False), (1, True), (2, False), (2, True)])

Callers

nothing calls this directly

Calls 3

set_to_frameMethod · 0.80
getMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected