def test_start(test_data): workout = Workout(test_data + '/basic.yml') workout.start() sleep(0.01) assert workout.current_interval() == workout.intervals[0] assert workout.elapsed() == approx_time(0.01)
def test_transition(test_data): workout = Workout(yaml_file=test_data + '/quick.yml') workout.start() sleep(0.01) progress = workout.progress() assert workout.current_interval() == workout.intervals[1] assert progress.changed_interval