HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/distutils/tests/__pycache__/test_cygwinccompiler.cpython-37.pyc
B

!��g�@s�dZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZmZm
Z
mZmZmZddlmZGdd	�d	e�ZGd
d�dejej�Zdd
�Zedkr�ee��dS)z$Tests for distutils.cygwinccompiler.�N)�BytesIO)�run_unittest)�cygwinccompiler)�check_config_h�CONFIG_H_OK�CONFIG_H_NOTOK�CONFIG_H_UNCERTAIN�get_versions�	get_msvcr)�supportc@seZdZdZdd�ZdS)�	FakePopenNcCsD|��d|_|jj}|j|kr2t||j�|_nt�|d�|_dS)Nr�r)�split�cmd�
test_class�_exesr�stdout�os�popen)�selfr�shellrZexes�r�@/usr/local/lib/python3.7/distutils/tests/test_cygwinccompiler.py�__init__s

zFakePopen.__init__)�__name__�
__module__�__qualname__rrrrrrrsrcsPeZdZ�fdd�Z�fdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	�Z
S)�CygwinCCompilerTestCasecsttt|���tj|_tj�|��d�|_	ddl
m}|j|_
|j|_tj|_|jt_i|_tj|_|t_tt_dS)Nzpython.hr)�	sysconfig)�superr�setUp�sys�versionr�path�joinZmkdtemp�python_h�	distutilsr�get_config_h_filename�old_get_config_h_filename�_get_config_h_filenamer�find_executable�old_find_executable�_find_executabler�Popen�	old_popenrr)rr)�	__class__rrr szCygwinCCompilerTestCase.setUpcs>|jt_ddlm}|j|_|jt_|j	t_
tt|��
�dS)Nr)r)r"r!r&rr(r'r+rr*r.r-rr�tearDown)rr)r/rrr0-sz CygwinCCompilerTestCase.tearDowncCs|jS)N)r%)rrrrr)5sz.CygwinCCompilerTestCase._get_config_h_filenamecCs||jkr|SdS)N)r)r�namerrrr,8s
z(CygwinCCompilerTestCase._find_executablecCstdt_|�t�dt�dt_|�t�dt�|�|jd�|�t�dt�|�|jd�|�t�dt�dS)NzX2.6.1 (r261:67515, Dec  6 2008, 16:42:21) 
[GCC 4.0.1 (Apple Computer, Inc. build 5370)]rzsomething without the *CC wordZxxxzxxx __GNUC__ xxx)	r!r"�assertEqualrrrZ
write_filer%r)rrrr�test_check_config_h=sz+CygwinCCompilerTestCase.test_check_config_hcCs�|�t�d�d|jd<t�}|�t|d�d�d|jd<t�}|�|dd�d|jd<t�}|�t|d	�d
�d|jd<t�}|�|d	d�d|jd
<t�}|�t|d�d
�d|jd
<t�}|�|dd�dS)N)NNNs#gcc (GCC) 3.4.5 (mingw special)
FSFZgccrz3.4.5svery strange outputsGNU ld version 2.17.50 20060824Zld�z2.17.50s@(#)PROGRAM:ld  PROJECT:ld64-77s GNU dllwrap 2.17.50 20060824
FSFZdllwrap�sCheese Wrap)r2r	r�str)rZresrrr�test_get_versionsTs&





z)CygwinCCompilerTestCase.test_get_versionscCs�dt_|�t�d�dt_|�t�dg�dt_|�t�dg�dt_|�t�dg�dt_|�t�d	g�d
t_|�tt�dS)NzX2.6.1 (r261:67515, Dec  6 2008, 16:42:21) 
[GCC 4.0.1 (Apple Computer, Inc. build 5370)]zF2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1300 32 bits (Intel)]Zmsvcr70zF2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bits (Intel)]Zmsvcr71zF2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1400 32 bits (Intel)]Zmsvcr80zF2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1500 32 bits (Intel)]Zmsvcr90zF2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1999 32 bits (Intel)])r!r"r2r
ZassertRaises�
ValueError)rrrr�test_get_msvcrvsz&CygwinCCompilerTestCase.test_get_msvcr)rrrr r0r)r,r3r7r9�
__classcell__rr)r/rrs"rcCs
t�t�S)N)�unittestZ	makeSuiterrrrr�
test_suite�sr<�__main__)�__doc__r;r!r�iorZtest.supportrr&rZdistutils.cygwinccompilerrrrrr	r
Zdistutils.testsr�objectrZTempdirManagerZTestCaserr<rrrrr�<module>s 
y