[Python-Dev] [Python-checkins] cpython: Skip some tests in the absence of multiprocessing. (original) (raw)

Éric Araujo merwok at netwok.org
Wed May 18 18:51:18 CEST 2011


Hi again,

http://hg.python.org/cpython/rev/4b7c29201c60 user: Vinay Sajip <vinaysajip at yahoo.co.uk> summary: Skip some tests in the absence of multiprocessing.

+ @unittest.skipUnless(threading, 'Threading required for this test.') Who wins, the commit message or the code? :)

+ try: + import multiprocessing as mp + r = logging.makeLogRecord({}) + self.assertEqual(r.processName, mp.currentprocess().name) + except ImportError: + pass Isn’t support.import_module or somesuch useful for this kind of checks?

Regards



More information about the Python-Dev mailing list