def test_one_time_event(): timeline = Timeline([ ('recurring-event', 1.), ]) timeline.add_one_time_event('one-timer', .1) events = timeline.pop_until(2.) assert_list_equal(events, ['one-timer', 'recurring-event', 'recurring-event'])
def test_one_time_event(): timeline = Timeline([("recurring-event", 1.0)]) timeline.add_one_time_event("one-timer", 0.1) events = timeline.pop_until(2.0) assert events == ["one-timer", "recurring-event", "recurring-event"]
def test_one_time_event(): timeline = Timeline([("recurring-event", 1.0)]) timeline.add_one_time_event("one-timer", 0.1) events = timeline.pop_until(2.0) assert events == ["one-timer", "recurring-event", "recurring-event"]