Example #1
0
 def test_string(self):
     with self.assertRaises(ValueError) as context:
         server.factorize('aaa')
Example #2
0
 def test_negative_float_number(self):
     with self.assertRaises(ValueError) as context:
         server.factorize(-17.17)
Example #3
0
 def test_positive_integer(self):
     primes = server.factorize(24)
     assert primes == (2, 2, 2, 3)
Example #4
0
 def test_one(self):
     with self.assertRaises(ValueError) as context:
         server.factorize(1)
Example #5
0
 def test_prime_number(self):
     primes = server.factorize(17)
     assert primes == (17,)