예제 #1
0
 def _test_numbers_less_than_one(self):
     self.assertEqual(primee.prime_checker(-1), "Number is less than one")
예제 #2
0
 def _test_number_equal_to_two(self):
     self.assertEqual(primee.prime_checker(2), "Number is prime")
예제 #3
0
 def test_composites(self):
     self.assertFalse(prime_checker(4), "Number is composite, not prime")
예제 #4
0
 def test_primes(self):
     self.assertTrue(prime_checker(2), "This is a prime number")
예제 #5
0
 def test_if_number_i_divisible_by_5(self):
     self.assertFalse(prime_checker(15), "Not a prime number")
예제 #6
0
 def test_if_number_is_divisible_by_7(self):
     self.assertTrue(prime_checker(7), "seven is a prime number")
예제 #7
0
 def test_if_number_is_even(self):
     self.assertFalse(prime_checker(4), "Number is not prime")
예제 #8
0
 def test_two(self):
     self.assertTrue(prime_checker(2), "Two is a prime number")
예제 #9
0
 def test_one(self):
     self.assertFalse(prime_checker(1), "One is not a prime number.")
예제 #10
0
 def test_zero(self):
     self.assertFalse(prime_checker(0), "Number is zero, not prime")
예제 #11
0
 def test_negative(self):
     self.assertFalse(prime_checker(-5), "Entrer a positive number")