Kaydet (Commit) 838edd8b authored tarafından Mark Dickinson's avatar Mark Dickinson

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.
........
üst 96125cf1
...@@ -292,7 +292,7 @@ class MathTests(unittest.TestCase): ...@@ -292,7 +292,7 @@ class MathTests(unittest.TestCase):
return result return result
values = range(10) + [50, 100, 500] values = range(10) + [50, 100, 500]
random.shuffle(values) random.shuffle(values)
for x in range(10): for x in values:
for cast in (int, long, float): for cast in (int, long, float):
self.assertEqual(math.factorial(cast(x)), fact(x), (x, fact(x), math.factorial(x))) self.assertEqual(math.factorial(cast(x)), fact(x), (x, fact(x), math.factorial(x)))
self.assertRaises(ValueError, math.factorial, -1) self.assertRaises(ValueError, math.factorial, -1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment