ó
[³XMc           @   s  d  Z  d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z m Z d d l	 m
 Z
 m Z m Z m Z d d l m Z d d l m Z d e f d „  ƒ  YZ e j e ƒ d	 e j f d
 „  ƒ  YZ d e j f d „  ƒ  YZ d e j f d „  ƒ  YZ d S(   s(   
Tests for L{twisted.python.threadpool}
iÿÿÿÿN(   t   unittestt   util(   t
   threadpoolt
   threadablet   failuret   context(   t   reactor(   t   Deferredt   Synchronizationc           B   s)   e  Z d  Z d „  Z d „  Z d g Z RS(   i    c         C   s.   | |  _  | |  _ t j ƒ  |  _ g  |  _ d  S(   N(   t   Nt   waitingt	   threadingt   Lockt   lockt   runs(   t   selfR	   R
   (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   __init__   s    		c         C   sª   |  j  j t ƒ rE t |  j ƒ d s5 t j d ƒ n  |  j  j ƒ  n |  j d 7_ |  j  j ƒ  |  j j	 d  ƒ t |  j ƒ |  j k r™ |  j j ƒ  n  |  j  j ƒ  d  S(   Ni   g-Cëâ6*?i   (   R   t   acquiret   Falset   lenR   t   timet   sleept   releaset   failurest   appendt   NoneR	   R
   (   R   (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   run   s    R   (   t   __name__t
   __module__R   R   R   t   synchronized(    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyR      s   		t   ThreadPoolTestCasec           B   sÎ   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 e j d	 d
 d e ƒ g e
 _ d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   s   
    Test threadpools.
    c         C   sH   xA t  d ƒ D]& } | j t ƒ r& Pn  t j d ƒ q W|  j d ƒ d  S(   Ni@B gñhãˆµøä>s%   A long time passed without succeeding(   t   xrangeR   R   R   R   t   fail(   R   R   t   i(    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   _waitForLock>   s
    c         C   s<   t  j d d ƒ } |  j | j d ƒ |  j | j d ƒ d S(   sy   
        L{ThreadPool.min} and L{ThreadPool.max} are set to the values passed to
        L{ThreadPool.__init__}.
        i   i   N(   R   t
   ThreadPoolt   assertEqualt   mint   max(   R   t   pool(    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   test_attributesG   s    c         C   s§   t  j d d ƒ } | j ƒ  |  j | j ƒ |  j t | j ƒ d ƒ t  j d d ƒ } |  j t | j ƒ d ƒ | j ƒ  |  j | j ƒ |  j t | j ƒ d ƒ d S(   sV   
        L{ThreadPool.start} creates the minimum number of threads specified.
        i    i   i   i
   N(   R   R#   t   startt
   addCleanupt   stopR$   R   t   threads(   R   R'   (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt
   test_startQ   s    

c         C   sþ   t  j d d ƒ } | j ƒ  |  j | j ƒ |  j | j g  ƒ d „  } d t f d „  ƒ  Y} | ƒ  } t j	 | ƒ } t j	 | ƒ } | j
 | | ƒ t j ƒ  } | j
 | j ƒ | j |  j ƒ  ƒ ~ ~ t j ƒ  |  j | ƒ  d ƒ |  j | ƒ  d ƒ d S(   sü   
        Test that creating threads in the threadpool with application-level
        objects as arguments doesn't results in those objects never being
        freed, with the thread maintaining a reference to them as long as it
        exists.
        i    i   c         S   s   d  S(   N(    (   t   arg(    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   workerp   s    t   Dumbc           B   s   e  Z RS(    (   R   R   (    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyR0   s   s   N(   R   R#   R)   R*   R+   R$   R,   t   objectt   weakreft   reft   callInThreadR   t   Eventt   sett   waitt
   getTimeoutt   gct   collectt   assertEqualsR   (   R   t   tpR/   R0   t   uniquet	   workerReft	   uniqueReft   event(    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   test_threadCreationArgumentsa   s$    
		
c            s†  t  j d d ƒ } | j ƒ  ˆ j | j ƒ ˆ j | j g  ƒ i  ‰ t j ƒ  ‰ t j ƒ  ‰ g  ‰  ‡  ‡ ‡ ‡ ‡ ‡ ‡ f d †  } ‡ f d †  } d t	 f d „  ƒ  Y‰ ˆ ƒ  } t
 j | ƒ } t
 j | ƒ ‰ t
 j | ƒ ‰ | j | | | d | ƒ~ ~ t j ƒ  ˆ j ƒ  ˆ j ˆ j ƒ  ƒ ˆ j ˆ ƒ  d ƒ ˆ j ˆ ƒ  d ƒ ~ t j ƒ  ˆ j | ƒ  d ƒ ˆ j ˆ  d ƒ  d ƒ d S(	   se   
        As C{test_threadCreationArguments} above, but for
        callInThreadWithCallback.
        i    i   c            sQ   ˆ j  ˆ j ƒ  ƒ ˆ ƒ  ˆ d <ˆ ƒ  ˆ d <ˆ j ƒ  ˆ  j t j | ƒ ƒ d  S(   NR>   R?   (   R7   R8   R6   R   R2   R3   (   t   successt   result(   t	   resultReft   onResultDoneR   R>   t   onResultWaitR?   t   refdict(    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   onResult    s
    
c            s   ˆ  ƒ  S(   N(    (   R.   t   test(   R0   (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyR/   ¨   s    R0   c           B   s   e  Z RS(    (   R   R   (    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyR0   ¬   s   RI   N(   R   R#   R)   R*   R+   R$   R,   R   R5   R1   R2   R3   t   callInThreadWithCallbackR9   R:   R6   R7   R8   R;   R   (   R   R<   RH   R/   R=   t   onResultRef(    (   RD   RE   R?   R>   R   RF   R0   RG   s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt4   test_threadCreationArgumentsCallInThreadWithCallbackŠ   s6    
!	


c         C   sz   t  j d d ƒ } |  j | j d ƒ |  j | j d ƒ t j t j | ƒ ƒ } |  j | j d ƒ |  j | j d ƒ d S(   s…   
        Threadpools can be pickled and unpickled, which should preserve the
        number of threads and other parameters.
        i   i   N(   R   R#   R;   R%   R&   t   picklet   loadst   dumps(   R   R'   t   copy(    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   test_persistenceÏ   s    c         C   s£   d } t  j ƒ  } | j ƒ  |  j | j ƒ t j ƒ  } | j ƒ  t | | ƒ } x! t	 | ƒ D] } | | | ƒ q^ W|  j
 | ƒ |  j | j d | j f ƒ d S(   s    
        Test synchronization of calls made with C{method}, which should be
        one of the mechanisms of the threadpool to execute work in threads.
        i
   s   run() re-entered %d timesN(   R   R#   R)   R*   R+   R   R   R   R   R   R"   t   failIfR   (   R   t   methodR	   R<   R
   t   actorR!   (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   _threadpoolTestà   s    	

c         C   s   |  j  d „  ƒ S(   s;   
        Call C{_threadpoolTest} with C{dispatch}.
        c         S   s   |  j  | | j ƒ S(   N(   t   dispatchR   (   R<   RT   (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   <lambda>  s    (   RU   (   R   (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   test_dispatchü   s    t   messagesJ   dispatch\(\) is deprecated since Twisted 8.0, use callInThread\(\) insteadt   categoryc         C   s   |  j  d „  ƒ S(   s?   
        Call C{_threadpoolTest} with C{callInThread}.
        c         S   s   |  j  | j ƒ S(   N(   R4   R   (   R<   RT   (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRW     s    (   RU   (   R   (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   test_callInThread	  s    c            s   d t  f d „  ƒ  Y‰  ‡  f d †  } t j d d ƒ } | j | ƒ | j ƒ  | j ƒ  |  j ˆ  ƒ } |  j t | ƒ d ƒ d S(   si   
        L{ThreadPool.callInThread} logs exceptions raised by the callable it
        is passed.
        t   NewErrorc           B   s   e  Z RS(    (   R   R   (    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyR\     s   c              s   ˆ  ƒ  ‚ d  S(   N(    (    (   R\   (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt
   raiseError  s    i    i   N(	   t	   ExceptionR   R#   R4   R)   R+   t   flushLoggedErrorsR$   R   (   R   R]   R<   t   errors(    (   R\   s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   test_callInThreadException  s    

c            s¥   t  j ƒ  ‰  ˆ  j ƒ  g  ‰ ‡  ‡ f d †  } t j d d ƒ } | j | d „  ƒ | j ƒ  z |  j ˆ  ƒ Wd | j ƒ  X|  j	 ˆ d ƒ |  j
 ˆ d d ƒ d S(   sÀ   
        L{ThreadPool.callInThreadWithCallback} calls C{onResult} with a
        two-tuple of C{(True, result)} where C{result} is the value returned
        by the callable supplied.
        c            s(   ˆ  j  ƒ  ˆ j |  ƒ ˆ j | ƒ d  S(   N(   R   R   (   RB   RC   (   t   waitert   results(    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRH   0  s    
i    i   c           S   s   d S(   NRI   (    (    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRW   6  s    NRI   (   R   R   R   R   R#   RJ   R)   R"   R+   t
   assertTrueR$   (   R   RH   R<   (    (   Rb   Rc   s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   test_callInThreadWithCallback%  s    

c            sí   d t  f d „  ƒ  Y‰ ‡ f d †  } t j ƒ  ‰  ˆ  j ƒ  g  ‰ ‡  ‡ f d †  } t j d d ƒ } | j | | ƒ | j ƒ  z |  j ˆ  ƒ Wd | j	 ƒ  X|  j
 ˆ d ƒ |  j t ˆ d t j ƒ ƒ |  j t ˆ d j ˆ ƒ ƒ d S(   sÍ   
        L{ThreadPool.callInThreadWithCallback} calls C{onResult} with a
        two-tuple of C{(False, failure)} where C{failure} represents the
        exception raised by the callable supplied.
        R\   c           B   s   e  Z RS(    (   R   R   (    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyR\   H  s   c              s   ˆ  ƒ  ‚ d  S(   N(    (    (   R\   (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyR]   K  s    c            s(   ˆ  j  ƒ  ˆ j |  ƒ ˆ j | ƒ d  S(   N(   R   R   (   RB   RC   (   Rb   Rc   (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRH   S  s    
i    i   N(   R^   R   R   R   R   R#   RJ   R)   R"   R+   t   assertFalseRd   t
   isinstanceR   t   Failuret
   issubclasst   type(   R   R]   RH   R<   (    (   Rb   Rc   R\   s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt0   test_callInThreadWithCallbackExceptionInCallbackB  s    

c            sð   d t  f d „  ƒ  Y‰ t j ƒ  } | j ƒ  g  ‰  ‡ ‡  f d †  } t j d d ƒ } | j | d „  ƒ | j | j ƒ | j	 ƒ  z |  j
 | ƒ Wd | j ƒ  X|  j ˆ ƒ } |  j t | ƒ d ƒ |  j ˆ  d ƒ |  j ˆ  d d ƒ d S(   sj   
        L{ThreadPool.callInThreadWithCallback} logs the exception raised by
        C{onResult}.
        R\   c           B   s   e  Z RS(    (   R   R   (    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyR\   k  s   c            s'   ˆ j  |  ƒ ˆ j  | ƒ ˆ  ƒ  ‚ d  S(   N(   R   (   RB   RC   (   R\   Rc   (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRH   s  s    i    i   c           S   s   d  S(   N(   R   (    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRW   y  s    N(   R^   R   R   R   R   R#   RJ   R4   R   R)   R"   R+   R_   R$   R   Rd   R   (   R   Rb   RH   R<   R`   (    (   Rc   R\   s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt0   test_callInThreadWithCallbackExceptionInOnResultf  s     

c            sÆ   g  ‰ d d l  ‰  t j ƒ  ‰ ‡ ‡  ‡ f d †  } ‡  ‡ f d †  } t j d d ƒ } | j | | ƒ | j ƒ  |  j | j ƒ ˆ j	 |  j
 ƒ  ƒ |  j t ˆ ƒ d ƒ |  j ˆ d ˆ d ƒ d S(   s   
        L{ThreadPool.callInThreadWithCallback} calls the function it is
        given and the C{onResult} callback in the same thread.
        iÿÿÿÿNc            s!   ˆ j  ˆ j ƒ  ƒ ˆ  j ƒ  d  S(   N(   R   t	   get_identR6   (   RB   RC   (   R@   t   threadt	   threadIds(    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRH   ”  s    c              s   ˆ j  ˆ  j ƒ  ƒ d  S(   N(   R   Rm   (    (   Rn   Ro   (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   func˜  s    i    i   i   (   Rn   R   R5   R   R#   RJ   R)   R*   R+   R7   R8   R$   R   (   R   RH   Rp   R<   (    (   Rn   Ro   R@   s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   test_callbackThread‰  s    
c            sä   t  j j ƒ  j d } d | d <g  ‰  t j ƒ  ‰ ‡  ‡ f d †  } ‡  f d †  } t j d d ƒ } | j | | ƒ | j	 ƒ  |  j
 | j ƒ ˆ j |  j ƒ  ƒ |  j t ˆ  ƒ d ƒ |  j | ˆ  d ƒ |  j | ˆ  d ƒ d	 S(
   s±   
        The context L{ThreadPool.callInThreadWithCallback} is invoked in is
        shared by the context the callable and C{onResult} callback are
        invoked in.
        iÿÿÿÿs   this must be presentt   testingc            s1   t  j j ƒ  j d } ˆ  j | ƒ ˆ j ƒ  d  S(   Niÿÿÿÿ(   R   t   theContextTrackert   currentContextt   contextsR   R6   (   RB   RC   t   ctx(   Ru   R@   (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRH   ²  s    c             s'   t  j j ƒ  j d }  ˆ  j |  ƒ d  S(   Niÿÿÿÿ(   R   Rs   Rt   Ru   R   (   Rv   (   Ru   (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRp   ·  s    i    i   i   N(   R   Rs   Rt   Ru   R   R5   R   R#   RJ   R)   R*   R+   R7   R8   R$   R   (   R   t   myctxRH   Rp   R<   (    (   Ru   R@   s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   test_callbackContext¥  s    

c         C   se   t  j ƒ  } | j ƒ  t j d d ƒ } | j | j ƒ | j ƒ  z |  j | ƒ Wd | j	 ƒ  Xd S(   sÃ   
        Work added to the threadpool before its start should be executed once
        the threadpool is started: this is ensured by trying to release a lock
        previously acquired.
        i    i   N(
   R   R   R   R   R#   R4   R   R)   R"   R+   (   R   Rb   R<   (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   test_existingWorkÇ  s    

c            sO   t  j ƒ  ‰  ˆ  j ƒ  |  j ˆ  j ƒ ‡  f d †  } |  j t d t | ƒ d S(   sB   
        Test for the deprecation of the dispatch method.
        c              s   ˆ  j  d  d „  ƒ S(   Nc           S   s   d  S(   N(   R   (    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRW   ã  s    (   RV   R   (    (   R<   (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   cbâ  s    sF   dispatch() is deprecated since Twisted 8.0, use callInThread() insteadN(   R   R#   R)   R*   R+   t   assertWarnst   DeprecationWarningt   __file__(   R   Rz   (    (   R<   s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   test_dispatchDeprecationÚ  s    
	c            sO   t  j ƒ  ‰  ˆ  j ƒ  |  j ˆ  j ƒ ‡  f d †  } |  j t d t | ƒ d S(   sN   
        Test for the deprecation of the dispatchWithCallback method.
        c              s   ˆ  j  d  d „  d „  d „  ƒ S(   Nc         S   s   d  S(   N(   R   (   t   x(    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRW   ö  s    c         S   s   d  S(   N(   R   (   R   (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRW   ÷  s    c           S   s   d  S(   N(   R   (    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRW   ø  s    (   t   dispatchWithCallbackR   (    (   R<   (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRz   ó  s
    sm   dispatchWithCallback() is deprecated since Twisted 8.0, use twisted.internet.threads.deferToThread() instead.N(   R   R#   R)   R*   R+   R{   R|   R}   (   R   Rz   (    (   R<   s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt$   test_dispatchWithCallbackDeprecationë  s    
	(   R   R   t   __doc__R"   R(   R-   RA   RL   RQ   RU   RX   R   t   suppressR|   R[   Ra   Re   Rk   Rl   Rq   Rx   Ry   R~   R   (    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyR   :   s,   			
		)	E								$	#		"		t   RaceConditionTestCasec           B   s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C   s5   t  j ƒ  |  _ t j d d ƒ |  _ |  j j ƒ  d  S(   Ni    i
   (   R   R5   R@   R   R#   R)   (   R   (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   setUp  s    c         C   s   |  `  |  j j ƒ  |  ` d  S(   N(   R@   R   R+   (   R   (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   tearDown  s    c         C   sÂ   |  j  ƒ  } |  j j |  j j ƒ |  j j | ƒ |  j j ƒ  x* t d ƒ D] } |  j j |  j j ƒ qL W|  j j |  j j ƒ |  j j | ƒ |  j j ƒ  s¾ |  j j ƒ  |  j	 d ƒ n  d S(   s…   
        Test a race condition: ensure that actions run in the pool synchronize
        with actions run in the main thread.
        i   s   Actions not synchronizedN(
   R8   R   R4   R@   R6   R7   t   cleart   ranget   isSetR    (   R   t   timeoutR!   (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   test_synchronization  s    c            sm   ˆ  j  ˆ  j j d ƒ t ƒ  ‰ ‡ f d †  ‰ ‡ ‡  ‡ f d †  ‰ ‡  f d †  } ˆ j | ƒ ˆ d ƒ ˆ S(   s  
        The submission of a new job to a thread pool in response to the
        C{onResult} callback does not cause a new thread to be added to the
        thread pool.

        This requires that the thread which calls C{onResult} to have first
        marked itself as available so that when the new job is queued, that
        thread may be considered to run it.  This is desirable so that when
        only N jobs are ever being executed in the thread pool at once only
        N threads will ever be created.
        i    c            s   t  j ˆ  | ƒ d  S(   N(   R   t   callFromThread(   RB   t   counter(   t   submit(    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRH   1  s    c            s6   ˆ  r% ˆ j  j ˆ ‡  f d †  ƒ n ˆ j d  ƒ d  S(   Nc              s   ˆ  d S(   Ni   (    (    (   R   (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRW   7  s    (   R   RJ   t   callbackR   (   R   (   RH   R   t   loopDeferred(   R   s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyRŽ   4  s    	c            s   ˆ  j  ˆ  j j d ƒ d  S(   Ni   (   R$   R   t   workers(   t   ignored(   R   (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   cbLoop;  s    i
   (   R;   R   R‘   R   t   addCallback(   R   R“   (    (   R   RŽ   RH   R   s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   test_singleThread   s    	
(   R   R   R…   R†   R‹   R•   (    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyR„     s   			t!   ThreadSafeListDeprecationTestCasec           B   s   e  Z d  Z d „  Z RS(   sT   
    Test deprecation of threadpool.ThreadSafeList in twisted.python.threadpool
    c         C   si   t  j ƒ  |  j |  j g ƒ } |  j t | ƒ d ƒ |  j | d d t ƒ |  j | d d d ƒ d S(   sC   
        Test deprecation of L{threadpool.ThreadSafeList}.
        i   i    RZ   RY   s§   twisted.python.threadpool.ThreadSafeList was deprecated in Twisted 10.1.0: This was an internal implementation detail of support for Jython 2.1, which is now obsolete.N(   R   t   ThreadSafeListt   flushWarningst   test_threadSafeListR;   R   t   assertIdenticalR|   (   R   t   warningsShown(    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyR™   J  s    
(   R   R   R‚   R™   (    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyR–   E  s   (   R‚   RM   R   R2   R9   R   t   twisted.trialR    R   t   twisted.pythonR   R   R   R   t   twisted.internetR   t   twisted.internet.deferR   R1   R   t   synchronizet   TestCaseR   R„   R–   (    (    (    s@   /usr/lib/python2.7/dist-packages/twisted/test/test_threadpool.pyt   <module>   s   <"#ÿ ÈD