'Util.number.isPrime'

def test_isPrime(self):

    self.assertEqual(number.isPrime((-3)), False)
    self.assertEqual(number.isPrime((-2)), False)
    self.assertEqual(number.isPrime(1), False)
    self.assertEqual(number.isPrime(2), True)
    self.assertEqual(number.isPrime(3), True)
    self.assertEqual(number.isPrime(4), False)
    self.assertEqual(number.isPrime(((2L ** 1279) - 1)), True)
    self.assertEqual(number.isPrime((- ((2L ** 1279) - 1))), False)
    for composite in (((43 * 127) * 211), ((61 * 151) * 211), (15259 * 30517), (346141L * 692281L), (1007119L * 2014237L), (3589477L * 7178953L), (4859419L * 9718837L), (2730439L * 5460877L), (245127919L * 490255837L), (963939391L * 1927878781L), (4186358431L * 8372716861L), (1576820467L * 3153640933L)):
        self.assertEqual(number.isPrime(long(composite)), False)
