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

Function test_equal_frame_rate_legacy_alias

tests/test_timecode.py:110–121  ·  view source on GitHub ↗

`equal_framerate()` is the soft-deprecated alias for `equal_frame_rate()` (issue #548). Both forms should produce identical results for every accepted operand type.

()

Source from the content-addressed store, hash-verified

108
109
110def test_equal_frame_rate_legacy_alias():
111 """`equal_framerate()` is the soft-deprecated alias for `equal_frame_rate()` (issue #548).
112 Both forms should produce identical results for every accepted operand type."""
113 tc = FrameTimecode(timecode=0, fps=30.0)
114 # float, Fraction, FrameTimecode operands.
115 other_tc = FrameTimecode(timecode=0, fps=30.0)
116 for other in (30.0, Fraction(30, 1), other_tc):
117 assert tc.equal_frame_rate(other) == tc.equal_framerate(other)
118 assert tc.equal_frame_rate(other) is True
119 # Mismatched rate.
120 assert tc.equal_frame_rate(24.0) is False
121 assert tc.equal_framerate(24.0) is False
122
123
124def test_timecode_numeric():

Callers

nothing calls this directly

Calls 3

equal_frame_rateMethod · 0.95
equal_framerateMethod · 0.95
FrameTimecodeClass · 0.90

Tested by

no test coverage detected