o
    HXhr                     @   sz   d Z ddlZddlZddlZddlmZ ddlmZ ddlmZ ddl	Z	ddlZG dd de	j
Zedkr;e	  dS dS )	zBDo a minimal test of all the modules that aren't otherwise tested.    N)support)import_helper)warnings_helperc                   @   s   e Zd Zdd Zdd ZdS )TestUntestedModulesc              
   C   s   d}t jddS |D ]$}z
td| W n tjy&   t| Y qw | d| qdd l	}zdd l
}W n tyJ   tjrHtd Y n	w W d    d S W d    d S 1 s^w   Y  d S )N)	encodingsTquietztest.test_{}z5{} has tests even though test_sundry claims otherwiser   zskipping tty)r   check_warningsr   import_moduleformatunittestSkipTest	importlibZfailZhtml.entitiesttyImportErrorr   verboseprint)selfZuntestednameZhtmlr    r   :/opt/python-3.10.19/usr/lib/python3.10/test/test_sundry.py%test_untested_modules_can_be_imported   s.   " z9TestUntestedModules.test_untested_modules_can_be_importedc                 C   s.  t jdd tjd d  }dd l}dtjv r#|tjd d < tddd l}dd l	}dd l
}dd l}dd l}dd l}dd l}tjdrMt sMdd l}dd l}dd l}dd l}dd l}dd l}dd l}dd l}dd l}dd l}dd l}dd l}dd l}dd l}dd l }W d    d S 1 sw   Y  d S )NTr   r   Z_distutils_hackz6setuptools has replaced distutils with its own versionwin)!r   r	   syspath	distutilsmodulesr   r   Zdistutils.bcppcompilerZdistutils.ccompilerZdistutils.cygwinccompilerZdistutils.filelistZdistutils.text_fileZdistutils.unixccompilerZdistutils.command.bdist_dumbplatform
startswithZwin32_is_iotZdistutils.command.bdist_msiZdistutils.command.bdistZdistutils.command.bdist_rpmZdistutils.command.build_clibZdistutils.command.build_extZdistutils.command.buildZdistutils.command.cleanZdistutils.command.configZdistutils.command.install_dataZ"distutils.command.install_egg_infoZ!distutils.command.install_headersZdistutils.command.install_libZdistutils.command.registerZdistutils.command.sdistZdistutils.command.upload)r   Z	path_copyr   r   r   r   test_distutils_modules    s@   
	
"z*TestUntestedModules.test_distutils_modulesN)__name__
__module____qualname__r   r   r   r   r   r   r      s    r   __main__)__doc__r   r   r   testr   Ztest.supportr   r   r   ZTestCaser   r    mainr   r   r   r   <module>   s    B