def test_sigma(self) : for n in self.known_values : for k in range(1, self.power_bound) : self.assertEqual( sum(i ** k for i in numbers.divisors(n)), numbers.sigma(n, k) )
def test_tau(self) : for n in self.known_values : self.assertEqual(len(list(numbers.divisors(n))), numbers.tau(n))