mirror of
https://github.com/python/cpython.git
synced 2025-11-09 18:11:38 +00:00
Merged revisions 81127 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81127 | mark.dickinson | 2010-05-12 20:54:51 +0100 (Wed, 12 May 2010) | 9 lines
Merged revisions 81126 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81126 | mark.dickinson | 2010-05-12 20:53:36 +0100 (Wed, 12 May 2010) | 1 line
Fix unused variable in test_factorial.
........
................
This commit is contained in:
parent
a29b181693
commit
3d9fa6da93
1 changed files with 1 additions and 1 deletions
|
|
@ -294,7 +294,7 @@ def fact(n):
|
|||
return result
|
||||
values = list(range(10)) + [50, 100, 500]
|
||||
random.shuffle(values)
|
||||
for x in range(10):
|
||||
for x in values:
|
||||
for cast in (int, float):
|
||||
self.assertEqual(math.factorial(cast(x)), fact(x), (x, fact(x), math.factorial(x)))
|
||||
self.assertRaises(ValueError, math.factorial, -1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue