| Server IP : 121.121.20.254 / Your IP : 216.73.217.141 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:/Python312/Lib/test/test_importlib/resources/__pycache__/ |
Upload File : |
�
���g� � �Z � d Z ddlZddlZddlZddlZd� Zd� Zd� Zedk( xr e� y y)z�
Generate the zip test data files.
Run to build the tests/zipdataNN/ziptestdata.zip files from
files in tests/dataNN.
Replaces the file with the working copy, but does commit anything
to the source repo.
� Nc �: � d} t t t | � � y)a;
>>> from unittest import mock
>>> monkeypatch = getfixture('monkeypatch')
>>> monkeypatch.setattr(zipfile, 'ZipFile', mock.MagicMock())
>>> print(); main() # print workaround for bpo-32509
<BLANKLINE>
...data01... -> ziptestdata/...
...
...data02... -> ziptestdata/...
...
)�01�02N)�tuple�map�generate)�suffixess �>C:\Python312\\Lib\test\test_importlib\resources\update-zips.py�mainr s � � �H� �#�h��
!�"� c � � t j t � j j t j � � }|d| � d�z }t j |d� 5 }t |d| � �z � D ]J \ }}dt j |j � � z }t |d|� |j ||� �L d d d � y # 1 sw Y y xY w)N�zipdataz/ziptestdata.zip�w�data�ziptestdataz->)�pathlib�Path�__file__�parent�relative_to�os�getcwd�zipfile�ZipFile�walk�
PurePosixPath�as_posix�print�write)�suffix�root�zfpath�zf�src�rel�dsts r
r r ! s� � ��<�<��!�(�(�4�4�R�Y�Y�[�A�D�
�g�f�X�%5�6�
6�F� ����� %���T�d�6�(�O�3�4�H�C���'�"7�"7�����"G�G�C��#�t�S�!��H�H�S�#�� 5�
&� %� %�s
�$AC
�
Cc # �2 K � t j | � D ]o \ }}}t j t � 5 |j d� d d d � |D ]1 }t
j |� |z }|j | � }||f�� �3 �q y # 1 sw Y �BxY w�w)N�__pycache__) r r �
contextlib�suppress�
ValueError�remover r r )�datapath�dirpath�dirnames� filenames�filename�resr% s r
r r + sy � �� �(*����(9�$���9�
�
�
��
,��O�O�M�*� -�!�H��,�,�w�'�(�2�C��/�/�(�+�C��s�(�N� "� ):�
,�
,�s �6B�B�
AB�B �B�__main__) �__doc__r) r r r r r r �__name__� r r
�<module>r7 s; ��� � � � �
#� �� �J� � !�4�6� !r