Test FrameTimecode constructor argument "timecode" with numeric arguments.
()
| 122 | |
| 123 | |
| 124 | def 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 | |
| 140 | def test_timecode_string(): |
nothing calls this directly
no test coverage detected