ó
[³XMc           @   s<   d  Z  d d l Z d d l m Z d e f d „  ƒ  YZ d S(   sS   
Tests to ensure all attributes of L{twisted.internet.gtkreactor} are 
deprecated.
iÿÿÿÿN(   t   TestCaset   GtkReactorDeprecationc           B   ss   e  Z d  Z d d d „  ƒ  YZ d d d „  ƒ  YZ d „  Z d „  Z d „  Z d „  Z d	 „  Z	 d
 „  Z
 d „  Z RS(   s_   
    Tests to ensure all attributes of L{twisted.internet.gtkreactor} are 
    deprecated.
    t   StubGTKc           B   s$   e  Z d  d d „  ƒ  YZ d „  Z RS(   t   GDKc           B   s   e  Z d  Z RS(   N(   t   __name__t
   __module__t   Nonet
   INPUT_READ(    (    (    sI   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_gtkreactor.pyR      s   c         G   s   d  S(   N(    (   t   selft   params(    (    sI   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_gtkreactor.pyt	   input_add   s    (    (   R   R   R   R
   (    (    (    sI   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_gtkreactor.pyR      s   t	   StubPyGTKc           B   s   e  Z d  „  Z RS(   c         C   s   d  S(   N(    (   R   t	   something(    (    sI   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_gtkreactor.pyt   require   s    (   R   R   R   (    (    (    sI   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_gtkreactor.pyR      s   c         C   s<   t  j j ƒ  |  _ |  j ƒ  t  j d <|  j ƒ  t  j d <d S(   s‰   
        Create a stub for the module 'gtk' if it does not exist, so that it can
        be imported without errors or warnings.
        t   gtkt   pygtkN(   t   syst   modulest   copyt   modsR   R   (   R   (    (    sI   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_gtkreactor.pyt   setUp   s    c         C   s$   t  j j ƒ  t  j j |  j ƒ d S(   sG   
        Return sys.modules to the way it was before the test.
        N(   R   R   t   cleart   updateR   (   R   (    (    sI   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_gtkreactor.pyt   tearDown(   s    c         C   sd   |  j  | g ƒ } |  j t | ƒ d ƒ |  j | d d t ƒ |  j | d d d | d ƒ d  S(   Ni   i    t   categoryt   messages   twisted.internet.gtkreactor.s‹    was deprecated in Twisted 10.1.0: All new applications should be written with gtk 2.x, which is supported by twisted.internet.gtk2reactor.(   t   flushWarningst   assertEqualst   lent   assertIdenticalt   DeprecationWarning(   R   t
   testmethodt   attributeNamet   warningsShown(    (    sI   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_gtkreactor.pyt   lookForDeprecationWarning0   s    c         C   s1   d d l  m } | j ƒ  |  j |  j d ƒ d S(   s>   
        Test deprecation of L{gtkreactor.GtkReactor}
        iÿÿÿÿ(   t
   gtkreactort
   GtkReactorN(   t   twisted.internetR#   R$   R"   t   test_gtkReactor(   R   R#   (    (    sI   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_gtkreactor.pyR&   <   s    
c         C   s1   d d l  m } | j ƒ  |  j |  j d ƒ d S(   s>   
        Test deprecation of L{gtkreactor.GtkReactor}
        iÿÿÿÿ(   R#   t   PortableGtkReactorN(   R%   R#   R'   R"   t   test_portableGtkReactor(   R   R#   (    (    sI   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_gtkreactor.pyR(   E   s    
c         C   s:   d d l  m } |  j t | j ƒ |  j |  j d ƒ d S(   s;   
        Test deprecation of L{gtkreactor.install}
        iÿÿÿÿ(   R#   t   installN(   R%   R#   t   assertRaisest   AssertionErrorR)   R"   t   test_install(   R   R#   (    (    sI   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_gtkreactor.pyR,   O   s    c         C   s:   d d l  m } |  j t | j ƒ |  j |  j d ƒ d S(   sC   
        Test deprecation of L{gtkreactor.portableInstall}
        iÿÿÿÿ(   R#   t   portableInstallN(   R%   R#   R*   R+   R-   R"   t   test_portableInstall(   R   R#   (    (    sI   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_gtkreactor.pyR.   X   s    (    (    (   R   R   t   __doc__R   R   R   R   R"   R&   R(   R,   R.   (    (    (    sI   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_gtkreactor.pyR      s   	
					
		(   R/   R   t   twisted.trial.unittestR    R   (    (    (    sI   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_gtkreactor.pyt   <module>   s   