def test_condition_not_negative_int_when_args_zero_or_positive_does_nothing(self): # Arrange # Act PyCondition.not_negative_int(0, "param") PyCondition.not_negative_int(1, "param") # Assert self.assertTrue(True) # ValueError not raised
def test_not_negative_int_when_args_zero_or_positive_does_nothing( self, value): # Arrange, Act, Assert: ValueError not raised PyCondition.not_negative_int(value, "param")
def test_not_negative_int_when_arg_negative_raises_value_error(self): # Arrange, Act, Assert with pytest.raises(ValueError): PyCondition.not_negative_int(-1, "param")