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

Function test_addition

tests/test_timecode.py:307–315  ·  view source on GitHub ↗

Test FrameTimecode addition (+/+=, __add__/__iadd__) operator.

()

Source from the content-addressed store, hash-verified

305
306
307def test_addition():
308 """Test FrameTimecode addition (+/+=, __add__/__iadd__) operator."""
309 x = FrameTimecode(timecode=1.0, fps=10.0)
310 assert x + 1 == FrameTimecode(timecode=1.1, fps=10.0)
311 assert x + 1 == FrameTimecode(1.1, x)
312 assert x + 10 == "00:00:02.000", str(x + 10)
313 assert x + 10 == 20
314 assert x + 10 == 2.0
315 assert x + 10 == "00:00:02.000"
316
317
318def test_subtraction():

Callers

nothing calls this directly

Calls 1

FrameTimecodeClass · 0.90

Tested by

no test coverage detected