Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_doctest2.cpython-311.opt-1.pyc |
�
�Keo � �� � d Z ddlZddlZej j dk r ej d� � � G d� de� � Z G d� dej � � Z dd l
T ed
k r ej � � dS dS )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 � � e Zd ZdZd� Zd� Z G d� de� � Zd� Zd� Z e
ee d� � � Zed
� � � Z
ed� � � ZdS )
�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 � � dS )z;C.__init__.
>>> print(C()) # 3
42
N� ��selfs �</usr/local/apps/python3/lib/python3.11/test/test_doctest2.py�__init__z
C.__init__! � � � � � c � � dS )z/
>>> print(C()) # 4
42
�42r r s r
�__str__z C.__str__( s � �
�tr
c � � e Zd ZdZd� ZdS )�C.DzJA nested D class.
>>> print("In D!") # 5
In D!
c � � dS )z8
>>> print(3) # 6
3
Nr r s r
�nestedz
C.D.nested6 r r
N)�__name__�
__module__�__qualname__�__doc__r r r
r
�Dr / s- � � � � � � � � � � � � r
r c � � | j S )zg
>>> c = C() # 7
>>> c.x = 12 # 8
>>> print(c.x) # 9
-12
��_xr s r
�getxzC.getx<