Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/test/test_doctest/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/test/test_doctest/__pycache__/test_doctest2.cpython-312.pyc

�

(Μgo	����dZddlZddlZejjdk\rej
d��Gd�de�ZGd�dej�Z	dd	l
�ed
k(rej�yy)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:

ЉЊЈЁЂ

�N�zCannot test docstrings with -O2c�t�eZdZdZd�Zd�ZGd�de�Zd�Zd�Z	e
ee	d�	�Zed
��Z
ed��Zy)
�Cu�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��y)z;C.__init__.

        >>> print(C()) # 3
        42
        N���selfs �</usr/local/lib/python3.12/test/test_doctest/test_doctest2.py�__init__z
C.__init__!���c��y)z/
        >>> print(C()) # 4
        42
        �42rrs r
�__str__z	C.__str__(s��
r
c��eZdZdZd�Zy)�C.DzJA nested D class.

        >>> print("In D!")   # 5
        In D!
        c��y)z8
            >>> print(3) # 6
            3
            Nrrs r
�nestedz
C.D.nested6rr
N)�__name__�
__module__�__qualname__�__doc__rrr
r
�Dr/s��	�	r
rc��|jS)zg
        >>> c = C()    # 7
        >>> c.x = 12   # 8
        >>> print(c.x)  # 9
        -12
        ��_xrs r
�getxzC.getx<s�����x�r
c��||_y)zm
        >>> c = C()     # 10
        >>> c.x = 12    # 11
        >>> print(c.x)   # 12
        -12
        Nr)r	�values  r
�setxzC.setxEs����r
zi        >>> c = C()    # 13
        >>> c.x = 12   # 14
        >>> print(c.x)  # 15
        -12
        )�docc��y)z�
        A static method.

        >>> print(C.statm())    # 16
        666
        >>> print(C().statm())  # 17
        666
        i�rrr
r
�statmzC.statmUs��r
c��|S)z�
        A class method.

        >>> print(C.clsm(22))    # 18
        22
        >>> print(C().clsm(23))  # 19
        23
        r)�cls�vals  r
�clsmzC.clsmas	���
r
N)rrrrrr�objectrrr �property�x�staticmethodr#�classmethodr'rr
r
rrsd������F����	��t�"�	
�A��	��	��	��	r
rc��eZdZd�Zy)�Testc���ddl}ddl}d}|j|jt�\}}|r|jd||fz�||k7r|jd||fz�yy)Nr�z%d of %d doctests failedz expected %d tests to run, not %d)�doctest�sys�testmod�modulesr�fail)r	r1r2�EXPECTED�f�ts      r
�test_testmodzTest.test_testmodos`��������s�{�{�8�4�5���1���I�I�0�A�q�6�9�:���=��I�I�8�H�a�=�H�I�r
N)rrrr9rr
r
r.r.ns��Jr
r.)�*�__main__)
rr2�unittest�flags�optimize�SkipTestr(r�TestCaser.r1r�mainrr
r
�<module>rBsx������9�9�����
�(�
�
�=�
>�>�X��X�vJ�8���J���z���H�M�M�O�r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists