MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / test_timecode_frame_num_for_vfr

Function test_timecode_frame_num_for_vfr

tests/test_timecode.py:438–443  ·  view source on GitHub ↗

frame_num should return approximate values for Timecode-backed objects without warning.

()

Source from the content-addressed store, hash-verified

436
437
438def test_timecode_frame_num_for_vfr():
439 """frame_num should return approximate values for Timecode-backed objects without warning."""
440 fps = Fraction(24000, 1001)
441 tc = FrameTimecode(timecode=Timecode(pts=1001, time_base=Fraction(1, 24000)), fps=fps)
442 # Should not raise or warn - just return the approximate frame number.
443 assert tc.frame_num == 1
444
445
446def test_arithmetic_with_bare_timecode():

Callers

nothing calls this directly

Calls 2

FrameTimecodeClass · 0.90
TimecodeClass · 0.90

Tested by

no test coverage detected