mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Issue 19898: Add test for dequereviter_new.
(Patch contributed by Claudiu Popa.)
This commit is contained in:
parent
3a0b6aa59b
commit
badf5d839d
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue