[Checkins] SVN: zc.ngi/trunk/src/zc/ngi/tests.py Updated test to work with Python 2.5.

Jim Fulton jim at zope.com
Tue Jul 27 16:46:56 EDT 2010


Log message for revision 115129:
  Updated test to work with Python 2.5.
  

Changed:
  U   zc.ngi/trunk/src/zc/ngi/tests.py

-=-
Modified: zc.ngi/trunk/src/zc/ngi/tests.py
===================================================================
--- zc.ngi/trunk/src/zc/ngi/tests.py	2010-07-27 18:41:26 UTC (rev 115128)
+++ zc.ngi/trunk/src/zc/ngi/tests.py	2010-07-27 20:46:56 UTC (rev 115129)
@@ -490,7 +490,7 @@
     >>> @functools.partial(zc.ngi.async.listener, None, thready=True)
     ... @zc.ngi.generator.handler
     ... def listener(conn):
-    ...     if 'client' not in threading.current_thread().name:
+    ...     if 'client' not in threading.currentThread().getName():
     ...         print 'oops'
     ...     yield
     >>> addr = listener.address
@@ -513,7 +513,7 @@
 
     >>> def count_client_threads():
     ...     return len([t for t in threading.enumerate()
-    ...                 if ("%r client" % (addr, )) in t.name])
+    ...                 if ("%r client" % (addr, )) in t.getName()])
     >>> count_client_threads()
     0
 



More information about the checkins mailing list