B
    u9aX  ã               @   sJ   d dl Z d dlZee dƒs$e d¡‚G dd„ dejƒZedkrFe ¡  dS )é    NÚopenptyzos.openpty() not available.c               @   s   e Zd Zdd„ ZdS )ÚOpenptyTestc             C   s`   t  ¡ \}}|  t j|¡ |  t j|¡ t  |¡s<|  d¡ t  |d¡ |  t  |d¡d¡ d S )Nz#Slave-end of pty is not a terminal.s   Ping!i   )	Úosr   Z
addCleanupÚcloseÚisattyZfailÚwriteZassertEqualÚread)ÚselfZmasterZslave© r
   ú"/usr/lib/python3.7/test_openpty.pyÚtest
   s    

zOpenptyTest.testN)Ú__name__Ú
__module__Ú__qualname__r   r
   r
   r
   r   r   	   s   r   Ú__main__)r   ZunittestÚhasattrZSkipTestZTestCaser   r   Úmainr
   r
   r
   r   Ú<module>   s
   

