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/2011-May/111448.html below:

[Python-Dev] [Python-checkins] cpython: Skip some more tests in the absence of threading.

[Python-Dev] [Python-checkins] cpython: Skip some more tests in the absence of threading. [Python-Dev] [Python-checkins] cpython: Skip some more tests in the absence of threading.Éric Araujo merwok at netwok.org
Wed May 18 18:47:49 CEST 2011
Hi,

> http://hg.python.org/cpython/rev/c83fb59b73ea
> user:        Vinay Sajip <vinay_sajip at yahoo.co.uk>
> date:        Tue May 17 07:15:53 2011 +0100
> summary:
>   Skip some more tests in the absence of threading

> diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
> --- a/Lib/test/test_logging.py
> +++ b/Lib/test/test_logging.py
>  try:
>      import threading
> +    # The following imports are needed only for tests which
> +    import asynchat
I guess “for tests which use threading”

> +if threading:
> +    class TestSMTPChannel(smtpd.SMTPChannel):
I wonder if you could have saved yourself all this reindenting if your
import had fallen back to dummy_threading.

> + at unittest.skipUnless(threading, 'Threading required for this test.')
I’d have used lower-case threading, to make it a bit clearer that it’s
the threading module that’s require, not some abstract notion of
threading.  But they may be the same thing, I’m not sure.

Regards
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