def test_story_ellapsed_returns_seconds(): story = Story(as_a="Someone", i_want_to="Do Something", so_that="I'm Happy", identity="Some File") story.start_run() time.sleep(0.1) story.end_run() expected = "0.1" ellapsed = "%.1f" % story.ellapsed() assert ellapsed == expected, "The ellapsed time should be %s but was %s" % (expected, ellapsed)
def test_story_end_run_marks_time(): story = Story(as_a="Someone", i_want_to="Do Something", so_that="I'm Happy", identity="Some File") story.end_run() assert story.end_time is not None, "There should be some end time after end_run"