Hi,

> http://hg.python.org/cpython/rev/c83fb59b73ea
> user:        Vinay Sajip <vinay_sa...@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.

> +@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
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to