File: //opt/cppython/lib/python3.8/test/test_tools/__pycache__/test_sundry.cpython-38.pyc
U
1D�gc � @ sh d Z ddlZddlZddlZddlmZ ddlmZmZm Z e � G dd� dej
�Zedkrde�
� dS )z�Tests for scripts in the Tools directory.
This file contains extremely basic regression tests for the scripts found in
the Tools directory of a Python checkout or tarball which don't have separate
tests of their own, such as h2py.py.
� N)�support)�
scriptsdir�import_tool�skip_if_missingc @ sf e Zd ZddddgZdgZdgZddgZee e e Zd d
� Ze �
ejdkd�d
d� �Z
dd� ZdS )�TestSundryScriptsZreindentZpdepsZ
gprof2htmlZmd5sumZ
make_ctypeZwin_add2path�analyze_dxpZ2to3c C sZ t �� }z@t�t�D ]0}|�d�s$q|d d� }|| jkr<qt|� qW 5 t j|� X d S )Nz.py���) r Z
modules_setupZmodules_cleanup�os�listdirr �endswith�skiplistr )�selfZold_modules�fn�name� r �:/opt/cppython/lib/python3.8/test/test_tools/test_sundry.py�test_sundry s
zTestSundryScripts.test_sundry�win32zWindows-only testc C s | j D ]}t|� qd S )N)�windows_onlyr )r
r r r r �test_sundry_windows0 s
z%TestSundryScripts.test_sundry_windowsc C s6 t td�rtd� n| �t�� td� W 5 Q R X d S )NZgetdxpr )�hasattr�sysr ZassertRaises�RuntimeError)r
r r r �test_analyze_dxp_import5 s
z)TestSundryScripts.test_analyze_dxp_importN)�__name__�
__module__�__qualname__Z whitelistZ blacklistr �otherr r �unittestZskipIfr �platformr r r r r r r s
r �__main__)�__doc__r r r �testr Ztest.test_toolsr r r ZTestCaser r �mainr r r r �<module> s ,