def test_step_should_not_be_able_to_mark_pending_when_not_running(): """A Step should not be able to be marked pending when it's not running""" # given step = Step(1, "keyword", "used_keyword", "text", None, None, None, None) # then with pytest.raises(RadishError): # when step.pending() assert step.state is not State.PENDING
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