File: //usr/lib/python3/dist-packages/twisted/python/test/__pycache__/test_zippath.cpython-310.pyc
o
�b-
� @ sT d Z ddlZddlZddlmZ ddlmZ ddlmZ dd� Z G dd � d e�Z
dS )
z0
Test cases covering L{twisted.python.zippath}.
� N)�_coerceToFilesystemEncoding)�
ZipArchive)�AbstractFilePathTestsc C s� t d| �} t d|�}t�|d��5}t�| �D ]&\}}}|D ]}tj�||�}tj�||�t| �d d� }|�||� qqW d � dS 1 sHw Y dS )zI
Create a zipfile on zfname, containing the contents of dirname'
� �w� N) r �zipfile�ZipFile�os�walk�path�join�len�write) �dirname�zfname�zf�root�ignored�files�fname�fspath�arcpath� r �B/usr/lib/python3/dist-packages/twisted/python/test/test_zippath.py�zipit s
���"�r c @ s0 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
S )�ZipFilePathTestszk
Test various L{ZipPath} path manipulations as well as reprs for L{ZipPath}
and L{ZipArchive}.
c s\ t �� � t� j� jd � td� j�� _t� jd �� _� j� _� fdd�� j D �� _ d S )N� .zipr c s g | ]}|� � j� jd ��qS )r )�replace�cmn)�.0�x��selfr r �
<listcomp>0 s z*ZipFilePathTests.setUp.<locals>.<listcomp>)
r �setUpr r r � nativecmnr r r �allr"