]> granicus.if.org Git - python/commitdiff
Check deques against common sequence tests (except for slicing).
authorRaymond Hettinger <python@rcn.com>
Wed, 1 Apr 2015 15:11:09 +0000 (08:11 -0700)
committerRaymond Hettinger <python@rcn.com>
Wed, 1 Apr 2015 15:11:09 +0000 (08:11 -0700)
Lib/test/test_deque.py

index 49d5dcfccc81599a6d4da89088c1685c65281fa9..b858509684129c70dba3a20922604c7a1fdfc93d 100644 (file)
@@ -843,6 +843,21 @@ class TestSubclassWithKwargs(unittest.TestCase):
         # SF bug #1486663 -- this used to erroneously raise a TypeError
         SubclassWithKwargs(newarg=1)
 
+class TestSequence(seq_tests.CommonTest):
+    type2test = deque
+
+    def test_getitem(self):
+        # For now, bypass tests that require slicing
+        pass
+
+    def test_getslice(self):
+        # For now, bypass tests that require slicing
+        pass
+
+    def test_subscript(self):
+        # For now, bypass tests that require slicing
+        pass
+
 #==============================================================================
 
 libreftest = """
@@ -957,6 +972,7 @@ def test_main(verbose=None):
         TestVariousIteratorArgs,
         TestSubclass,
         TestSubclassWithKwargs,
+        TestSequence,
     )
 
     support.run_unittest(*test_classes)