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

Function test_timecode_numeric

tests/test_timecode.py:124–137  ·  view source on GitHub ↗

Test FrameTimecode constructor argument "timecode" with numeric arguments.

()

Source from the content-addressed store, hash-verified

122
123
124def test_timecode_numeric():
125 """Test FrameTimecode constructor argument "timecode" with numeric arguments."""
126 with pytest.raises(ValueError):
127 FrameTimecode(timecode=-1, fps=1.0)
128 with pytest.raises(ValueError):
129 FrameTimecode(timecode=-1.0, fps=1.0)
130 with pytest.raises(ValueError):
131 FrameTimecode(timecode=-0.1, fps=1.0)
132 with pytest.raises(ValueError):
133 FrameTimecode(timecode=-1.0 / 1000, fps=1.0)
134 assert FrameTimecode(timecode=0, fps=1.0).frame_num == 0
135 assert FrameTimecode(timecode=1, fps=1.0).frame_num == 1
136 assert FrameTimecode(timecode=0.0, fps=1.0).frame_num == 0
137 assert FrameTimecode(timecode=1.0, fps=1.0).frame_num == 1
138
139
140def test_timecode_string():

Callers

nothing calls this directly

Calls 1

FrameTimecodeClass · 0.90

Tested by

no test coverage detected