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/2008-July/081176.html below:

[Python-Dev] PEP: Consolidating names in the `unittest` module

[Python-Dev] PEP: Consolidating names in the `unittest` module [Python-Dev] PEP: Consolidating names in the `unittest` moduleGuido van Rossum guido at python.org
Wed Jul 16 00:13:22 CEST 2008
On Tue, Jul 15, 2008 at 3:20 PM, Stephen J. Turnbull <stephen at xemacs.org> wrote:
>  > * Positive admonition: The ``assert*`` names state the intent of how
>  >   the code under test *should* behave, while the ``fail*`` names are
>  >   phrased in terms of how the code *should not* behave.
>
> FWIW, I think these are fairly stated.  So fairly that I'm surprised
> you haven't been persuaded!<wink>  Nitpick: the second point is not
> just "precedent", there's an economic reason there too.  Tests in the
> standard distribution which use the deprecated style will need to be
> converted.  Steven d'Aprano claims this is nontrivial (and thus error-
> prone) in some cases.  I haven't seen that claim denied, and it seems
> plausible to me.

I'd like to see examples of that (this would be Steven's task if he's
serious about his assertion). Since the fail and assert names are
mapped to each other using aliasing I don't see how it could be
nontrivial to map e.g. self.failIf(x) to self.assertFalse(x) -- these
are the same function!

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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