Hi again,
> http://hg.python.org/cpython/rev/4b7c29201c60
> user: Vinay Sajip <[email protected]>
> 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
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com