summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-11-29 05:54:48 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-11-29 05:54:48 (GMT)
commite1defa4175426594be53c1bc6c3d2f02a0952bae (patch)
tree31663cadc4ebc6d93bf0b7b8983bc4fa8bc19635 /Lib/test
parentf4c7c402d4944c3e1ff1a83925d5e11549ff4e36 (diff)
downloadcpython-e1defa4175426594be53c1bc6c3d2f02a0952bae.zip
cpython-e1defa4175426594be53c1bc6c3d2f02a0952bae.tar.gz
cpython-e1defa4175426594be53c1bc6c3d2f02a0952bae.tar.bz2
Fix argument order in pure python version of nsmallest() and nlargest().
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_heapq.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_heapq.py b/Lib/test/test_heapq.py
index 7848e4e..68003e7 100644
--- a/Lib/test/test_heapq.py
+++ b/Lib/test/test_heapq.py
@@ -39,8 +39,11 @@ class TestHeap(unittest.TestCase):
self.check_invariant(results)
self.assertRaises(TypeError, heappush, [])
- self.assertRaises(TypeError, heappush, None, None)
- self.assertRaises(TypeError, heappop, None)
+ try:
+ self.assertRaises(TypeError, heappush, None, None)
+ self.assertRaises(TypeError, heappop, None)
+ except AttributeError:
+ pass
def check_invariant(self, heap):
# Check the heap invariant.