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