mς
­fIc           @   sU   d  Z  d k l Z d e f d     YZ d   Z d k Te d j o e   n d S(   uπ   A module to test whether doctest recognizes some 2.2 features,
like static and class methods.

>>> print 'yup'  # 1
yup

We include some (random) encoded (utf-8) text in the text surrounding
the example.  It should be ignored:

ΠΠΠΠΠ

(   s   test_supportt   Cc           B   s   t  Z d  Z d   Z d   Z d e f d     YZ d   Z d   Z e	 e e d d Z
 d	   Z e e  Z d
   Z e e  Z RS(   u΅   Class C.

    >>> print C()  # 2
    42


    We include some (random) encoded (utf-8) text in the text surrounding
    the example.  It should be ignored:

        ΠΠΠΠΠ

    c         C   s   d S(   s:   C.__init__.

        >>> print C() # 3
        42
        N(    (   t   self(    (    t/   /mit/python/lib/python2.4/test/test_doctest2.pyt   __init__   s    c         C   s   d S(   s.   
        >>> print C() # 4
        42
        t   42N(    (   R   (    (    R   t   __str__&   s     t   Dc           B   s   t  Z d  Z d   Z RS(   sI   A nested D class.

        >>> print "In D!"   # 5
        In D!
        c         C   s   d S(   s7   
            >>> print 3 # 6
            3
            N(    (   R   (    (    R   t   nested4   s    (   t   __name__t
   __module__t   __doc__R   (    (    (    R   R   -   s    c         C   s   |  i S(   sf   
        >>> c = C()    # 7
        >>> c.x = 12   # 8
        >>> print c.x  # 9
        -12
        N(   R   t   _x(   R   (    (    R   t   getx:   s     c         C   s   | |  _ d S(   sl   
        >>> c = C()     # 10
        >>> c.x = 12    # 11
        >>> print c.x   # 12
        -12
        N(   t   valueR   R   (   R   R   (    (    R   t   setxC   s     t   docsh           >>> c = C()    # 13
        >>> c.x = 12   # 14
        >>> print c.x  # 15
        -12
        c           C   s   d S(   s   
        A static method.

        >>> print C.statm()    # 16
        666
        >>> print C().statm()  # 17
        666
        i  N(    (    (    (    R   t   statmS   s     c         C   s   | S(   s   
        A class method.

        >>> print C.clsm(22)    # 18
        22
        >>> print C().clsm(23)  # 19
        23
        N(   t   val(   t   clsR   (    (    R   t   clsm`   s     (   R   R	   R
   R   R   t   objectR   R   R   t   propertyt   xR   t   staticmethodR   t   classmethod(    (    (    R   R       s    								c          C   sV   d k  l } d }  t i |  \ } } | |  j o t i d |  | f   n d  S(   N(   s   test_doctest2i   s    expected %d tests to run, not %d(   t   testt   test_doctest2t   EXPECTEDt   test_supportt   run_doctestt   ft   tt
   TestFailed(   R   R   R   R   (    (    R   t	   test_mainm   s
    (   t   *t   __main__N(   R
   R   R   R   R    R!   t   doctestR   (   R   R    R!   (    (    R   t   ?   s   \	
