Re: [Python-Dev] [Python-checkins] cpython: Skip some tests in the absence of multiprocessing.
On Thu, May 19, 2011 at 2:51 AM, Éric Araujo mer...@netwok.org wrote: Isn’t support.import_module or somesuch useful for this kind of checks? You have to restructure your tests into the appropriate files for that to work, as support.import_module() throws SkipTest if the module isn't available. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia ___ 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
Re: [Python-Dev] [Python-checkins] cpython: Skip some tests in the absence of multiprocessing.
Hi again, http://hg.python.org/cpython/rev/4b7c29201c60 user:Vinay Sajip vinay_sa...@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.current_process().name) +except ImportError: +pass Isn’t support.import_module or somesuch useful for this kind of checks? 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