Beispiel #1
0
def test_story_ellapsed_returns_zero_for_non_finished_stories():
    scenario = Scenario(index="1", title="Something", story=None)
    scenario.start_run()
    expected = 0
    ellapsed = int(scenario.ellapsed())
    assert ellapsed == expected, "The ellapsed time should be %d but was %d" % (
        expected, ellapsed)
def test_scenario_ellapsed_returns_seconds():
    scenario = Scenario(index="1", title="Something", story=None)
    scenario.start_run()
    time.sleep(0.1)
    scenario.end_run()

    expected = "0.1"
    ellapsed = "%.1f" % scenario.ellapsed()
    assert ellapsed == expected, "The ellapsed time should be %s but was %s" % (expected, ellapsed)
Beispiel #3
0
def test_scenario_ellapsed_returns_seconds():
    scenario = Scenario(index="1", title="Something", story=None)
    scenario.start_run()
    time.sleep(0.1)
    scenario.end_run()

    expected = "0.1"
    ellapsed = "%.1f" % scenario.ellapsed()
    assert ellapsed == expected, "The ellapsed time should be %s but was %s" % (
        expected, ellapsed)
Beispiel #4
0
def test_scenario_start_run_marks_time():
    scenario = Scenario(index="1", title="Something", story=None)
    scenario.start_run()
    assert scenario.start_time is not None, "There should be some start time after start_run"
def test_scenario_start_run_marks_time():
    scenario = Scenario(index="1", title="Something", story=None)
    scenario.start_run()
    assert scenario.start_time is not None, "There should be some start time after start_run"
def test_story_ellapsed_returns_zero_for_non_finished_stories():
    scenario = Scenario(index="1", title="Something", story=None)
    scenario.start_run()
    expected = 0
    ellapsed = int(scenario.ellapsed())
    assert ellapsed == expected, "The ellapsed time should be %d but was %d" % (expected, ellapsed)