summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-02-06 19:04:56 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-02-06 19:04:56 (GMT)
commit3ba85c2e8a2e25dcbc737edca43759756bcd291e (patch)
tree183f5946bbf86ee8df07b3de46d74ab90b343bb0 /Lib
parent1dd8309246a1a1dfb1d28957d0a2a1aa64fbd4fe (diff)
downloadcpython-3ba85c2e8a2e25dcbc737edca43759756bcd291e.zip
cpython-3ba85c2e8a2e25dcbc737edca43759756bcd291e.tar.gz
cpython-3ba85c2e8a2e25dcbc737edca43759756bcd291e.tar.bz2
Have deques support high volume loads.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_deque.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/test_deque.py b/Lib/test/test_deque.py
index 6221c91..51ce7b0 100644
--- a/Lib/test/test_deque.py
+++ b/Lib/test/test_deque.py
@@ -28,6 +28,18 @@ class TestBasic(unittest.TestCase):
self.assertEqual(right, range(150, 400))
self.assertEqual(list(d), range(50, 150))
+ def test_extend(self):
+ d = deque('a')
+ self.assertRaises(TypeError, d.extend, 1)
+ d.extend('bcd')
+ self.assertEqual(list(d), list('abcd'))
+
+ def test_extendleft(self):
+ d = deque('a')
+ self.assertRaises(TypeError, d.extendleft, 1)
+ d.extendleft('bcd')
+ self.assertEqual(list(d), list(reversed('abcd')))
+
def test_len(self):
d = deque('ab')
self.assertEqual(len(d), 2)