def test_odd_num(self): self.assertTrue(is_odd(3))
def test_is_even(self): self.assertFalse(is_odd(0))
def test_even_num(self): self.assertFalse(is_odd(2))
def test_zero(self): self.assertFalse(is_odd(0))
def test_neg_num(self): self.assertTrue(is_odd(-3))
def test_is_odd(self): self.assertTrue(is_odd(1)) self.assertTrue(is_odd(1337)) self.assertFalse(is_odd(2)) self.assertFalse(is_odd(20)) self.assertFalse(is_odd(0))
def test_throws_exception(self): with self.assertRaises(Exception): is_odd('hello')