A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2015-April/138973.html below:

[Python-Dev] [Python-checkins] cpython: Check deques against common sequence tests (except for slicing).

[Python-Dev] [Python-checkins] cpython: Check deques against common sequence tests (except for slicing).Zachary Ware zachary.ware+pydev at gmail.com
Wed Apr 1 17:27:54 CEST 2015
On Wed, Apr 1, 2015 at 10:11 AM, raymond.hettinger
<python-checkins at python.org> wrote:
> https://hg.python.org/cpython/rev/393189326adb
> changeset:   95350:393189326adb
> user:        Raymond Hettinger <python at 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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4