def test_special_zero(self): """ my_function(0) is special, and returns 100 """ x = my_function(0) if x != 100: self.fail("Zero is special, my_function(0) didn't return 100!")
def test_special_zero(self): """ my_function(0) is special and returns 100 """ x = my_function(0) if x != 100: self.fail( "Zero is special the function should return 100 did not return 100" )
def test_does_not_crash(self): """ my_function() does not crash when called """ my_function(5)
def test_true_and_false(self): """ Using assertTrue and assertFalse to test things """ self.assertTrue(my_function(5) == 10) self.assertFalse(my_function(2) == 5)