³ò
 ›\Kc           @   sq   d  Z  d d k Z d d k Z d d k l Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d d
 d	 „  ƒ  YZ d S(   s&   Support code for distutils test cases.iÿÿÿÿN(   t   logt   LoggingSilencerc           B   s   e  Z d  „  Z d „  Z RS(   c         C   s,   t  t |  ƒ i ƒ  t i t i ƒ |  _ d  S(   N(   t   superR   t   setUpR    t   set_thresholdt   FATALt	   threshold(   t   self(    (    s-   /usr/lib/python2.5/distutils/tests/support.pyR      s    c         C   s'   t  i |  i ƒ t t |  ƒ i ƒ  d  S(   N(   R    R   R   R   R   t   tearDown(   R   (    (    s-   /usr/lib/python2.5/distutils/tests/support.pyR      s    (   t   __name__t
   __module__R   R   (    (    (    s-   /usr/lib/python2.5/distutils/tests/support.pyR   	   s   	t   TempdirManagerc           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s}   Mix-in class that handles temporary directories for test cases.

    This is intended to be used with unittest.TestCase.
    c         C   s    t  t |  ƒ i ƒ  g  |  _ d  S(   N(   R   R   R   t   tempdirs(   R   (    (    s-   /usr/lib/python2.5/distutils/tests/support.pyR      s    c         C   sE   t  t |  ƒ i ƒ  x+ |  i o  |  i i ƒ  } t i | ƒ q Wd  S(   N(   R   R   R   R   t   popt   shutilt   rmtree(   R   t   d(    (    s-   /usr/lib/python2.5/distutils/tests/support.pyR      s
     
c         C   s    t  i ƒ  } |  i i | ƒ | S(   sj   Create a temporary directory that will be cleaned up.

        Returns the path of the directory.
        (   t   tempfilet   mkdtempR   t   append(   R   R   (    (    s-   /usr/lib/python2.5/distutils/tests/support.pyR   $   s    (   R	   R
   t   __doc__R   R   R   (    (    (    s-   /usr/lib/python2.5/distutils/tests/support.pyR      s   		t   DummyCommandc           B   s    e  Z d  Z d „  Z d „  Z RS(   sA   Class to store options for retrieval via set_undefined_options().c         K   s1   x* | i  ƒ  D] \ } } t |  | | ƒ q Wd  S(   N(   t   itemst   setattr(   R   t   kwargst   kwt   val(    (    s-   /usr/lib/python2.5/distutils/tests/support.pyt   __init__1   s     c         C   s   d  S(   N(    (   R   (    (    s-   /usr/lib/python2.5/distutils/tests/support.pyt   ensure_finalized5   s    (   R	   R
   R   R   R   (    (    (    s-   /usr/lib/python2.5/distutils/tests/support.pyR   .   s   	(    (	   R   R   R   t	   distutilsR    t   objectR   R   R   (    (    (    s-   /usr/lib/python2.5/distutils/tests/support.pys   <module>   s   