Exemple #1
0
 def test_string(self):
     with self.assertRaises(ValueError) as context:
         server.is_prime('aaa')
Exemple #2
0
 def test_negative_float_number(self):
     with self.assertRaises(ValueError) as context:
         server.is_prime(-17.17)
Exemple #3
0
 def test_even_number(self):
     assert not server.is_prime(4)
Exemple #4
0
 def test_one(self):
     with self.assertRaises(ValueError) as context:
         server.is_prime(1)
Exemple #5
0
 def test_prime_number(self):
     assert server.is_prime(17)