B
    u9a7	                 @   sd   d dl Z d dlZd dlmZ e jjdkr2edG dd deZdd Z	d d	l
T ed
kr`e	  dS )    N)support   zCannot test docstrings with -O2c               @   sb   e Zd Zdd Zdd ZG dd deZdd Zd	d
 Ze	eeddZ
edd Zedd ZdS )Cc             C   s   d S )N )selfr   r   #/usr/lib/python3.7/test_doctest2.py__init__"   s    z
C.__init__c             C   s   dS )NZ42r   )r   r   r   r   __str__)   s    z	C.__str__c               @   s   e Zd Zdd ZdS )zC.Dc             C   s   d S )Nr   )r   r   r   r   nested7   s    z
C.D.nestedN)__name__
__module____qualname__r
   r   r   r   r   D0   s   r   c             C   s   | j  S )N)_x)r   r   r   r   getx=   s    zC.getxc             C   s
   || _ d S )N)r   )r   valuer   r   r   setxF   s    zC.setxzi        >>> c = C()    # 13
        >>> c.x = 12   # 14
        >>> print(c.x)  # 15
        -12
        )docc               C   s   dS )Ni  r   r   r   r   r   statmV   s    
zC.statmc             C   s   |S )Nr   )clsvalr   r   r   clsmb   s    
zC.clsmN)r   r   r   r   r	   objectr   r   r   propertyxstaticmethodr   classmethodr   r   r   r   r   r      s   		r   c              C   s<   ddl m}  d}t| \}}||kr8td||f d S )Nr   )test_doctest2   z expected %d tests to run, not %d)testr   r   Zrun_doctestZ
TestFailed)r   ZEXPECTEDftr   r   r   	test_mainn   s    r"   )*__main__)sysZunittestr   r   flagsoptimizeZSkipTestr   r   r"   Zdoctestr   r   r   r   r   <module>   s   
Z
