Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Checkins

r76439 - in python/branches/py3k: Lib/test/test_multiprocessing.py

 

 

Python checkins RSS feed   Index | Next | Previous | View Threaded


python-checkins at python

Nov 21, 2009, 10:20 AM

Post #1 of 1 (133 views)
Permalink
r76439 - in python/branches/py3k: Lib/test/test_multiprocessing.py

Author: jesse.noller
Date: Sat Nov 21 19:09:38 2009
New Revision: 76439

Log:
Merged revisions 76438 via svnmerge from
svn+ssh://pythondev [at] svn/python/trunk

........
r76438 | jesse.noller | 2009-11-21 09:38:23 -0500 (Sat, 21 Nov 2009) | 1 line

issue6615: Additional test for logging support in multiprocessing
........


Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Lib/test/test_multiprocessing.py

Modified: python/branches/py3k/Lib/test/test_multiprocessing.py
==============================================================================
--- python/branches/py3k/Lib/test/test_multiprocessing.py (original)
+++ python/branches/py3k/Lib/test/test_multiprocessing.py Sat Nov 21 19:09:38 2009
@@ -1723,6 +1723,26 @@
root_logger.setLevel(root_level)
logger.setLevel(level=LOG_LEVEL)

+
+class _TestLoggingProcessName(BaseTestCase):
+
+ def handle(self, record):
+ assert record.processName == multiprocessing.current_process().name
+ self.__handled = True
+
+ def test_logging(self):
+ handler = logging.Handler()
+ handler.handle = self.handle
+ self.__handled = False
+ # Bypass getLogger() and side-effects
+ logger = logging.getLoggerClass()(
+ 'multiprocessing.test.TestLoggingProcessName')
+ logger.addHandler(handler)
+ logger.propagate = False
+
+ logger.warn('foo')
+ assert self.__handled
+
#
# Test to verify handle verification, see issue 3321
#
_______________________________________________
Python-checkins mailing list
Python-checkins [at] python
http://mail.python.org/mailman/listinfo/python-checkins

Python checkins RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.