[pypy-svn] rev 556 - pypy/trunk/src/pypy/module/test
lac at codespeak.net
lac at codespeak.net
Tue May 27 15:17:35 CEST 2003
Author: lac
Date: Tue May 27 15:17:35 2003
New Revision: 556
Modified:
pypy/trunk/src/pypy/module/test/test_minmax.py
Log:
Check that when min or max is fed a non-sequence, it fails.
Modified: pypy/trunk/src/pypy/module/test/test_minmax.py
==============================================================================
--- pypy/trunk/src/pypy/module/test/test_minmax.py (original)
+++ pypy/trunk/src/pypy/module/test/test_minmax.py Tue May 27 15:17:35 2003
@@ -9,8 +9,8 @@
def tearDown(self):
pass
- def test_min_one(self):
- self.assertEqual(min(1), 1)
+ def test_min_notseq(self):
+ self.assertRaises(TypeError, min, 1)
def test_min_usual(self):
self.assertEqual(min(1, 2, 3), 1)
@@ -44,8 +44,8 @@
def tearDown(self):
pass
- def test_max_one(self):
- self.assertEqual(max(1), 1)
+ def test_max_notseq(self):
+ self.assertRaises(TypeError, max, 1)
def test_max_usual(self):
self.assertEqual(max(1, 2, 3), 3)
More information about the Pypy-commit
mailing list