def test_boolean(self): # Python 2.x legacy. Ew. self.assertFalse(builtins.is_odd(False)) self.assertTrue(builtins.is_odd(True))
def test_boolean(self): # Python 2.x legacy. Ew. self.assertFalse(is_odd(False)) self.assertTrue(is_odd(True))
def test_parity(self): self.assertTrue(builtins.is_odd(1)) self.assertFalse(builtins.is_odd(2)) self.assertTrue(builtins.is_odd(-1)) self.assertFalse(builtins.is_odd(-2)) self.assertFalse(builtins.is_odd(0))
def test_parity(self): self.assertTrue(is_odd(1)) self.assertFalse(is_odd(2)) self.assertTrue(is_odd(-1)) self.assertFalse(is_odd(-2)) self.assertFalse(is_odd(0))