[Python-Dev] [Python-checkins] cpython: Skip some more tests in the absence of threading. (original) (raw)
Éric Araujo merwok at netwok.org
Wed May 18 18:47:49 CEST 2011
- Previous message: [Python-Dev] 2.7.2 and 3.1.4
- Next message: [Python-Dev] [Python-checkins] cpython: Skip some tests in the absence of multiprocessing.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
http://hg.python.org/cpython/rev/c83fb59b73ea user: Vinay Sajip <vinaysajip 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/testlogging.py b/Lib/test/testlogging.py --- a/Lib/test/testlogging.py +++ b/Lib/test/testlogging.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
- Previous message: [Python-Dev] 2.7.2 and 3.1.4
- Next message: [Python-Dev] [Python-checkins] cpython: Skip some tests in the absence of multiprocessing.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]