def test_step_should_be_able_to_mark_pending_while_running(): """A Step should be able to be marked pending while it's running""" # given step = Step(1, "keyword", "used_keyword", "text", None, None, None, None) step.state = State.RUNNING # when step.pending() # then assert step.state is State.PENDING
def test_step_should_be_able_to_skip_while_running(): """A Step should be able to be skipped while it's running""" # given step = Step(1, "keyword", "used_keyword", "text", None, None, None, None) step.state = State.RUNNING # when step.skip() # then assert step.state is State.SKIPPED
def test_step_fail_to_run_if_already_run(mocker): """A Step should fail to run if it was already run / has another state then UNTESTED""" # given step = Step(1, "keyword", "used_keyword", "text", None, None, None, None) step_impl_mock = mocker.MagicMock(name="Step Impl") step_impl_match_mock = mocker.MagicMock(name="Step Impl Match") step.assign_implementation(step_impl_mock, step_impl_match_mock) step.state = State.PASSED # then with pytest.raises(RadishError): # when step.run(None)