Tests that finalise_front() correctly finalises the segment.
()
| 262 | |
| 263 | |
| 264 | def test_finalise_front(): |
| 265 | """ |
| 266 | Tests that finalise_front() correctly finalises the segment. |
| 267 | """ |
| 268 | segment = DurationSegment(5, 5, 40, 50, 50) |
| 269 | assert_equal(segment.duration(), 5) |
| 270 | assert_equal(segment.time_warp(), 5) |
| 271 | |
| 272 | assert_equal(segment.start_early(), 50) |
| 273 | assert_equal(segment.start_late(), 50) |
| 274 | assert_equal(segment.release_time(), 50) |
| 275 | |
| 276 | # Test that finalising does not affect duration and time warp. |
| 277 | finalised = segment.finalise_front() |
| 278 | assert_equal(finalised.duration(), 5) |
| 279 | assert_equal(finalised.time_warp(), 5) |
| 280 | |
| 281 | # Same start_early and start_late as segment, but no release time. |
| 282 | assert_equal(finalised.start_early(), 50) |
| 283 | assert_equal(finalised.start_late(), 50) |
| 284 | assert_equal(finalised.release_time(), 0) |
| 285 | |
| 286 | |
| 287 | def test_repeated_merge_and_finalise_back(): |
nothing calls this directly
no test coverage detected