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.10/test/test_importlib/__pycache__/update-zips.cpython-310.pyc
o

�i��@sTdZddlZddlZddlZddlZdd�Zdd�Zdd�Zed	ko'e�dSdS)
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.
�NcCsd}ttt|��dS)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/...
    ...
    )Z01Z02N)�tuple�map�generate)�suffixes�r�</usr/local/lib/python3.10/test/test_importlib/update-zips.py�mainsrcCs�t�t�j�t���}|d|�d�}t�|d��,}t	|d|���D]\}}dt�
|���}t|d|�|�
||�q#Wd�dS1sHwYdS)NZzipdataz/ziptestdata.zip�w�dataZziptestdataz->)�pathlib�Path�__file__�parent�relative_to�os�getcwd�zipfile�ZipFile�walk�
PurePosixPath�as_posix�print�write)�suffix�rootZzfpath�zf�src�rel�dstrrrr!s�"�rc	cs|�t�|�D]5\}}}t�t��
|�d�Wd�n1s wY|D]}t�|�|}|�|�}||fVq'qdS)N�__pycache__)	rr�
contextlib�suppress�KeyError�removerrr)�datapath�dirpath�dirnames�	filenames�filename�resrrrrr+s��
��r�__main__)	�__doc__r rrrrrr�__name__rrrr�<module>s