Re: [Python-Dev] [Python-checkins] cpython: Check deques against common sequence tests (except for slicing).
On Wed, Apr 1, 2015 at 10:11 AM, raymond.hettinger <python-checkins@python.org> wrote:
https://hg.python.org/cpython/rev/393189326adb changeset: 95350:393189326adb user: Raymond Hettinger <python@rcn.com> date: Wed Apr 01 08:11:09 2015 -0700 summary: Check deques against common sequence tests (except for slicing).
files: Lib/test/test_deque.py | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_deque.py b/Lib/test/test_deque.py --- a/Lib/test/test_deque.py +++ b/Lib/test/test_deque.py @@ -843,6 +843,21 @@ # 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
Instead of making these empty passing tests, it's better to set them to 'None' so that unittest doesn't run them (and thus doesn't report success when it hasn't actually tested something). -- Zach
participants (1)
-
Zachary Ware