[Python-checkins] r70934 - in python/trunk: Doc/library/asyncore.rst Lib/asyncore.py Lib/test/test_asyncore.py

josiah.carlson python-checkins at python.org
Wed Apr 1 03:28:12 CEST 2009


Author: josiah.carlson
Date: Wed Apr 1 03:28:11 2009
New Revision: 70934
Log:
Fix for failing asyncore tests.
Modified:
 python/trunk/Doc/library/asyncore.rst
 python/trunk/Lib/asyncore.py
 python/trunk/Lib/test/test_asyncore.py
Modified: python/trunk/Doc/library/asyncore.rst
==============================================================================
--- python/trunk/Doc/library/asyncore.rst	(original)
+++ python/trunk/Doc/library/asyncore.rst	Wed Apr 1 03:28:11 2009
@@ -81,7 +81,8 @@
 +----------------------+----------------------------------------+
 | Event | Description |
 +======================+========================================+
- | ``handle_connect()`` | Implied by the first write event |
+ | ``handle_connect()`` | Implied by the first read or write |
+ | | event |
 +----------------------+----------------------------------------+
 | ``handle_close()`` | Implied by a read event with no data |
 | | available |
Modified: python/trunk/Lib/asyncore.py
==============================================================================
--- python/trunk/Lib/asyncore.py	(original)
+++ python/trunk/Lib/asyncore.py	Wed Apr 1 03:28:11 2009
@@ -401,7 +401,7 @@
 sys.stderr.write('log: %s\n' % str(message))
 
 def log_info(self, message, type='info'):
- if __debug__ or type not in self.ignore_log_types:
+ if type not in self.ignore_log_types:
 print '%s: %s' % (type, message)
 
 def handle_read_event(self):
Modified: python/trunk/Lib/test/test_asyncore.py
==============================================================================
--- python/trunk/Lib/test/test_asyncore.py	(original)
+++ python/trunk/Lib/test/test_asyncore.py	Wed Apr 1 03:28:11 2009
@@ -298,6 +298,7 @@
 
 def test_unhandled(self):
 d = asyncore.dispatcher()
+ d.ignore_log_types = ()
 
 # capture output of dispatcher.log_info() (to stdout via print)
 fp = StringIO()
@@ -313,7 +314,7 @@
 sys.stdout = stdout
 
 lines = fp.getvalue().splitlines()
- expected = ['warning: unhandled exception',
+ expected = ['warning: unhandled incoming priority event',
 'warning: unhandled read event',
 'warning: unhandled write event',
 'warning: unhandled connect event',


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /