MCPcopy Index your code
hub / github.com/Breakthrough/PySceneDetect / test_identity

Function test_identity

tests/test_timecode.py:336–342  ·  view source on GitHub ↗

Test FrameTimecode values, when used in init return the same values

(frame_num, fps)

Source from the content-addressed store, hash-verified

334 "frame_num,fps", [(1, 1.0), (61, 14.0), (29, 25.0), (126, Fraction(24000, 1001))]
335)
336def test_identity(frame_num, fps):
337 """Test FrameTimecode values, when used in init return the same values"""
338 frame_time_code = FrameTimecode(frame_num, fps=fps)
339 assert FrameTimecode(frame_time_code) == frame_time_code
340 assert FrameTimecode(frame_time_code.frame_num, fps=fps) == frame_time_code
341 assert FrameTimecode(frame_time_code.seconds, fps=fps) == frame_time_code
342 assert FrameTimecode(frame_time_code.get_timecode(), fps=fps) == frame_time_code
343
344
345def test_precision():

Callers

nothing calls this directly

Calls 2

get_timecodeMethod · 0.95
FrameTimecodeClass · 0.90

Tested by

no test coverage detected