B
    u9a÷  ã               @   s^   d dl Zd dlZd dlmZ d dlmZ e d¡G dd„ dej	ƒƒZ
dd„ ZedkrZeƒ  dS )	é    N)Úsupportz,XXX: buildbot.python.org/all/xmlrpc/ is gonec               @   s   e Zd Zdd„ ZdS )ÚPythonBuildersTestc          
      s„   t  d¡‰ yˆ  ¡ }W n0 tk
rF } z|  d| ¡ W d d }~X Y nX |  ‡ fdd„¡ |  |tjj	¡ |  
dd„ |D ƒ|¡ d S )Nz&http://buildbot.python.org/all/xmlrpc/znetwork error: %sc                  s
   ˆ dƒƒ S )NÚclose© r   )Úserverr   ú%/usr/lib/python3.7/test_xmlrpc_net.pyÚ<lambda>   ó    z9PythonBuildersTest.test_python_builders.<locals>.<lambda>c             S   s   g | ]}d |kr|‘qS )z3.xr   )Ú.0Úxr   r   r   ú
<listcomp>   s    z;PythonBuildersTest.test_python_builders.<locals>.<listcomp>)Ú	xmlrpclibZServerProxyZgetAllBuildersÚOSErrorZskipTestZ
addCleanupZassertIsInstanceÚcollectionsÚabcÚSequenceZ
assertTrue)ÚselfZbuildersÚer   )r   r   Útest_python_builders   s    
 z'PythonBuildersTest.test_python_buildersN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s   r   c               C   s   t  d¡ t  t¡ d S )NZnetwork)r   ZrequiresZrun_unittestr   r   r   r   r   Ú	test_main   s    
r   Ú__main__)Zcollections.abcr   ZunittestZtestr   Zxmlrpc.clientZclientr   ÚskipZTestCaser   r   r   r   r   r   r   Ú<module>   s   
