Sindbad~EG File Manager
�
)Μg���Z�dZddlZddlZddlZddlZd�Zd�Zd�Zedk(xr e�yy)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}ttt|��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 �F/usr/local/lib/python3.12/test/test_importlib/resources/update-zips.py�mainrs���H� �#�h��
!�"�c��tjt�jj tj��}|d|�d�z}tj|d�5}t|d|��z�D]J\}}dtj|j��z}t|d|�|j||��L ddd�y#1swYyxYw)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
rr!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#�2K�tj|�D]o\}}}tjt�5|jd�ddd�|D]1}t
j|�|z}|j|�}||f���3�qy#1swY�BxYw�w)N�__pycache__) rr�
contextlib�suppress�
ValueError�removerrr)�datapath�dirpath�dirnames� filenames�filename�resr%s r
rr+sy����(*����(9�$���9�
�
�
��
,��O�O�M�*�-�!�H��,�,�w�'�(�2�C��/�/�(�+�C��s�(�N�"�):�
,�
,�s�6B�B�
AB�B �B�__main__) �__doc__r)rrrrrr�__name__�rr
�<module>r7s;���� ���
#� �� �J��!�4�6�!r
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists