diff options
Diffstat (limited to 'Lib/test/test_math.py')
-rw-r--r-- | Lib/test/test_math.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index a7df00f..cfaf3b3 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -1889,8 +1889,8 @@ class MathTests(unittest.TestCase): perm = math.perm factorial = math.factorial # Test if factorial definition is satisfied - for n in range(100): - for k in range(n + 1): + for n in range(500): + for k in (range(n + 1) if n < 100 else range(30) if n < 200 else range(10)): self.assertEqual(perm(n, k), factorial(n) // factorial(n - k)) @@ -1953,8 +1953,8 @@ class MathTests(unittest.TestCase): comb = math.comb factorial = math.factorial # Test if factorial definition is satisfied - for n in range(100): - for k in range(n + 1): + for n in range(500): + for k in (range(n + 1) if n < 100 else range(30) if n < 200 else range(10)): self.assertEqual(comb(n, k), factorial(n) // (factorial(k) * factorial(n - k))) |