Tests that the ``max_duration`` argument is evaluated correctly, and indeed increases the time warp if it's violated.
()
| 88 | |
| 89 | |
| 90 | def test_max_duration_argument(): |
| 91 | """ |
| 92 | Tests that the ``max_duration`` argument is evaluated correctly, and indeed |
| 93 | increases the time warp if it's violated. |
| 94 | """ |
| 95 | ds = DurationSegment(5, 0, 0, 0, 0) # five duration |
| 96 | |
| 97 | assert_equal(ds.time_warp(), 0) # default not duration limited |
| 98 | assert_equal(ds.time_warp(max_duration=2), 3) |
| 99 | assert_equal(ds.time_warp(max_duration=0), 5) |
| 100 | |
| 101 | |
| 102 | def test_OkSmall_with_time_warp(ok_small): |
nothing calls this directly
no test coverage detected