MCPcopy Create free account
hub / github.com/DeepLabCut/DeepLabCut / test_writer_rescale

Function test_writer_rescale

tests/test_video.py:126–132  ·  view source on GitHub ↗
(tmp_path, video_clip, target_height)

Source from the content-addressed store, hash-verified

124
125@pytest.mark.parametrize("target_height", [200, 177])
126def test_writer_rescale(tmp_path, video_clip, target_height):
127 file = video_clip.rescale(width=-1, height=target_height, dest_folder=str(tmp_path))
128 vid = VideoWriter(file)
129 assert vid.height == target_height
130 # Verify the aspect ratio is preserved
131 ar = video_clip.height / target_height
132 assert vid.width == pytest.approx(video_clip.width // ar, abs=1)

Callers

nothing calls this directly

Calls 2

VideoWriterClass · 0.90
rescaleMethod · 0.80

Tested by

no test coverage detected