import unittest

from fancymath.math import is_even, is_odd


class TestMath(unittest.TestCase):
    def test_is_even(self):
        "Test the is_even function"
        self.assertTrue(is_even(2))
        self.assertTrue(is_even(-4))
        self.assertTrue(is_even(0))
        self.assertFalse(is_even(1))
        self.assertFalse(is_even(2.5))

    def test_is_odd(self):
        "Test the is_odd function"
        self.assertTrue(is_odd(3))
        self.assertTrue(is_odd(-5))
        self.assertFalse(is_odd(0))
        self.assertFalse(is_odd(2))
        self.assertFalse(is_odd(2.5))


if __name__ == "__main__":
    unittest.main()