HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/test/test_importlib/__pycache__/test_windows.cpython-311.opt-2.pyc
�

��Vc
����ddlmZejd��ZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
ddlmZejddg�	��dd
lmZmZmZmZmZmZmZmZmZd�Zd�Ze
dd
���Zejej� d��d��Gd�d����Z!ej"e!e���\Z#Z$ejej� d��d��Gd�d����Z%ej"e%e���\Z&Z'ejej� d��d��Gd�dej(����Z)e*dkrej+��dSdS)�)�utilzimportlib.machineryN)�
import_helper)�contextmanager)�temp_module�winreg�win)�required_on)	�	CreateKey�HKEY_CURRENT_USER�SetValue�REG_SZ�KEY_ALL_ACCESS�EnumKey�CloseKey�	DeleteKey�OpenKeyc�f�dddd�}dtjvr,tjd|vr|tjdSdtj���vrdSdtj���vrdSdtj���vrd	StjS)
N�win32z	win-amd64z	win-arm32)�x86�x64�arm�VSCMD_ARG_TGT_ARCH�amd64z(arm)z(arm64)z	win-arm64)�os�environ�sys�version�lower�platform)�TARGET_TO_PLATs �4D:\Python311\Lib\test\test_importlib\test_windows.py�get_platformr"s������
�
�N�
	��
�*�
�
�
�'�(�N�:�
��b�j�)=�>�?�?�	�C�K�%�%�'�'�	'���{�	�C�K�%�%�'�'�	'���{�	�c�k�'�'�)�)�	)���{��|��c��	t||t���}n#t$rYdSwxYw		t|d��}n#t$rYnwxYwt	||���3t|��t
||��dS)N)�accessTr)rr�OSErrorr�delete_registry_treerr)�root�subkey�hkey�	subsubkeys    r!r'r''s�����t�V�N�;�;�;���������������.�	���a�(�(�I�I���	�	�	��E�	����	�T�9�-�-�-�
.�
�T�N�N�N�
�d�F�����s��
(�(�>�
A�
Ac#��K�|jjr
|jj}n|jj}|�|dt
jdd�z���}d�t
jjt
jj��}	t|d��5}	tt|��|jjr tj
�|��}n|}n#t$r|}YnwxYwt!t|��}|�|dz}t#|dt$|��dV�ddd��n#1swxYwY|rt't|��dSdS#|rt't|��wwxYw)Nz%d.%d�)�fullname�sys_versionz Software\Python\PythonCore\{}.{}za = 1z.py�)�WindowsRegistryFinder�DEBUG_BUILD�REGISTRY_KEY_DEBUG�REGISTRY_KEY�formatr�version_info�major�minorrrrr�path�dirnamer&r
rr
r')	�	machinery�namer9r(�key�base_key�location�
delete_keyr)s	         r!�setup_modulerA7s������&�2�<��.�A����.�;��
�+�+�t�")�C�,<�R�a�R�,@�"@��B�B�C�4�;�;����� 0� 6�8�8�H�@�
��w�
'�
'�
	�8�
&��)�8�4�4�4��2�>�%�!#�����!5�!5�J�J�!$�J����
&�
&�
&�%�
�
�
�
&�����0�#�6�6�F��
(��%�'���V�R���.�.�.��E�E�E�
	�
	�
	�
	�
	�
	�
	�
	�
	�
	�
	����
	�
	�
	�
	��	@� �!2�J�?�?�?�?�?�	@�	@��:�	@� �!2�J�?�?�?�?�	@���sU�	E�D4�AC�D4�C.�+D4�-C.�.:D4�(E�4D8�8E�;D8�<E�E4zrequires Windowsc�j�eZdZd�ej����Zd�Zd�Zd�Z	d�Z
dS)�WindowsRegistryFinderTestsz	spamham{}c�p�|jj�d��}|�|d��dS)N�spam)r;r1�	find_spec�assertIs)�self�specs  r!�test_find_spec_missingz1WindowsRegistryFinderTests.test_find_spec_missing]s4���~�3�=�=�f�E�E���
�
�d�D�!�!�!�!�!r#c��tj��5tjdt��|jj�d��}ddd��n#1swxYwY|�|d��dS)N�ignorerE)�warnings�catch_warnings�simplefilter�DeprecationWarningr;r1�find_modulerG)rH�loaders  r!�test_find_module_missingz3WindowsRegistryFinderTests.test_find_module_missingas���
�
$�
&�
&�	N�	N��!�(�,>�?�?�?��^�9�E�E�f�M�M�F�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N�	N����	N�	N�	N�	N�	
�
�
�f�d�#�#�#�#�#s�:A�A�!Ac���t|j|j��5tj��5tjdt��|jj�|j��}ddd��n#1swxYwY|jj�	|j��}|�
|d��|�
|d��ddd��dS#1swxYwYdS)NrL)rAr;�test_modulerMrNrOrPr1rQrF�assertIsNot�rHrRrIs   r!�test_module_foundz,WindowsRegistryFinderTests.test_module_foundgsh��
�$�.�$�*:�
;�
;�	)�	)��(�*�*�
\�
\��%�h�0B�C�C�C���=�I�I�$�JZ�[�[��
\�
\�
\�
\�
\�
\�
\�
\�
\�
\�
\����
\�
\�
\�
\��>�7�A�A�$�BR�S�S�D����V�T�*�*�*����T�4�(�(�(�
	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)����	)�	)�	)�	)�	)�	)s5�C"�?A:�.C"�:A>	�>C"�A>	�AC"�"C&�)C&c���t|j|jd���5tj��5tjdt��|jj�|j��}ddd��n#1swxYwY|jj�	|j��}|�
|��|�
|��ddd��dS#1swxYwYdS)N�.)r9rL)rAr;rUrMrNrOrPr1rQrF�assertIsNonerWs   r!�test_module_not_foundz0WindowsRegistryFinderTests.test_module_not_foundpsi��
�$�.�$�*:��
E�
E�
E�	$�	$��(�*�*�
\�
\��%�h�0B�C�C�C���=�I�I�$�JZ�[�[��
\�
\�
\�
\�
\�
\�
\�
\�
\�
\�
\����
\�
\�
\�
\��>�7�A�A�$�BR�S�S�D����f�%�%�%����d�#�#�#�
	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$����	$�	$�	$�	$�	$�	$s5�C"�?A<�0C"�<B	�C"�B	�AC"�"C&�)C&N)�__name__�
__module__�__qualname__r5r�getpidrUrJrSrXr\�r#r!rCrCWsm�������$�$�Y�R�Y�[�[�1�1�K�"�"�"�$�$�$�)�)�)�$�$�$�$�$r#rC)r;c��eZdZd�ZdS)�WindowsExtensionSuffixTestsc	��|jj}d�tjtjddt������}	|�d��}n*#t$r|�d��}d|z}YnwxYw|�
||��|�|��}|�||��dS)Nz.cp{0.major}{0.minor}-{1}.pydz[^a-zA-Z0-9]�_z.pydz_d.pyd�_d)r;�EXTENSION_SUFFIXESr5rr6�re�subr"�index�
ValueError�assertIn�
assertLess)rH�suffixes�expected_tag�
untagged_i�tagged_is     r!�test_tagged_suffixz.WindowsExtensionSuffixTests.test_tagged_suffixs����>�4��6�=�=�c�>N��F�>�3����7�7�9�9��	/�!����/�/�J�J���	/�	/�	/�!����1�1�J��,�.�L�L�L�	/����	
�
�
�l�H�-�-�-��>�>�,�/�/������*�-�-�-�-�-s�A$�$$B�
BN)r]r^r_rrrar#r!rcrc}s#������.�.�.�.�.r#rcc��eZdZd�Zd�ZdS)�WindowsBootstrapPathTestsc��ddlm}||�}|���|���krdS|�||��dS)Nr)�
_path_join)�importlib._bootstrap_externalrv�casefold�assertEqual)rH�expected�inputsrv�actuals     r!�
check_joinz$WindowsBootstrapPathTests.check_join�sd��<�<�<�<�<�<���V�$�������&�/�/�"3�"3�3�	��F�����6�*�*�*�*�*r#c	��|�dddd��|�dddddd��|�dddd��|�ddd��|�dd��|�d	d
d��|�d	dd
d��|�d	dd	��|�dddd
��|�ddd��|�ddd��|�dddd
��|�ddd��|�dddd��|�ddddd
��|�dddddd
��|�ddddddd
��|�dddddd
��|�dd��|�dd��|�dd d!��|�dd"d!��|�d#d#d!��|�d$d%d!��|�d$d&d!��dS)'NzC:\A\BzC:\�A�BzD:\�DzC:BzA\BzD:AzD:zC:\B\CzA\B\C�CzB\CzA\B/CzB/CzA/zB\zA\../Cz../CzA.\.\BzA.rZz\\Server\Share\A\B\Cz\\Server\Sharez\Az\\Server2\Share2z\\Serverz\Sharez\\Server\Share\\zC:\AzC:/Ar0zC:/zC:z//Server/Share\z//Server/Share/z//Server/Share)r})rHs r!�test_path_joinz(WindowsBootstrapPathTests.test_path_join�sr�����	�6�3��4�4�4����	�6�3���S�A�A�A����	�6�3��6�6�6����	�6�6�2�2�2����	�9�-�-�-�����u�c�*�*�*�����y�$��4�4�4�����y�&�1�1�1�����#�s�C�0�0�0�����#�v�.�.�.�����#�u�-�-�-�����$��s�3�3�3�	
���	�3��/�/�/����	�4��c�2�2�2����/�1B�C��c�R�R�R����/�1B�C��PS�UX�Y�Y�Y����/�1D�c�1B�C��c�	S�	S�	S����/��i��c�SV�W�W�W����)�+<�=�=�=����+�-@�A�A�A�	
������,�,�,������r�*�*�*�����d�B�'�'�'����*�,=�r�B�B�B����*�,<�b�A�A�A�A�Ar#N)r]r^r_r}r�rar#r!rtrt�s7������+�+�+�!B�!B�!B�!B�!Br#rt�__main__)N),�test.test_importlibr�	test_util�import_importlibr;rrhr�unittestrM�test.supportr�
contextlibr�test.test_importlib.utilr�
import_modulerr
rrr
rrrrrr"r'rA�
skipUnlessr�
startswithrC�	test_both�!Frozen_WindowsRegistryFinderTests�!Source_WindowsRegistryFinderTestsrc�"Frozen_WindowsExtensionSuffixTests�"Source_WindowsExtensionSuffixTests�TestCasertr]�mainrar#r!�<module>r�s���1�1�1�1�1�1�&�I�&�'<�=�=�	�	�	�	�	�	�	�	�	�
�
�
�
���������&�&�&�&�&�&�%�%�%�%�%�%�0�0�0�0�0�0��
��H�5�'�:�:�:�:��������������������������&��� �@�@�@���@�>���S�\�,�,�U�3�3�5G�H�H�$�$�$�$�$�$�$�I�H�$�F�Y��3�y�I�I�I��"�"����S�\�,�,�U�3�3�5G�H�H�.�.�.�.�.�.�.�I�H�.�&�Y��4�	�J�J�J��#�#����S�\�,�,�U�3�3�5G�H�H�)B�)B�)B�)B�)B�� 1�)B�)B�I�H�)B�V�z����H�M�O�O�O�O�O��r#