summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_deque.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2014-06-15 03:41:22 (GMT)
committerRaymond Hettinger <python@rcn.com>2014-06-15 03:41:22 (GMT)
commitbadf5d839d9174da126a326dc6e75374a0150d46 (patch)
tree0cd429f283d74a7326b0e4d6b7a4897e44a35aea /Lib/test/test_deque.py
parent3a0b6aa59bbc1ff204a48c53876d57a2c6bbf818 (diff)
downloadcpython-badf5d839d9174da126a326dc6e75374a0150d46.zip
cpython-badf5d839d9174da126a326dc6e75374a0150d46.tar.gz
cpython-badf5d839d9174da126a326dc6e75374a0150d46.tar.bz2
Issue 19898: Add test for dequereviter_new.
(Patch contributed by Claudiu Popa.)
Diffstat (limited to 'Lib/test/test_deque.py')
-rw-r--r--Lib/test/test_deque.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_deque.py b/Lib/test/test_deque.py
index 7bff1d2..787181c 100644
--- a/Lib/test/test_deque.py
+++ b/Lib/test/test_deque.py
@@ -507,6 +507,11 @@ class TestBasic(unittest.TestCase):
for s in ('abcd', range(2000)):
self.assertEqual(list(reversed(deque(s))), list(reversed(s)))
+ def test_reversed_new(self):
+ klass = type(reversed(deque()))
+ for s in ('abcd', range(2000)):
+ self.assertEqual(list(klass(deque(s))), list(reversed(s)))
+
def test_gc_doesnt_blowup(self):
import gc
# This used to assert-fail in deque_traverse() under a debug