| Server IP : 138.197.176.125 / Your IP : 216.73.217.54 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/twisted/python/test/__pycache__/ |
Upload File : |
U
W[�
� @ sd d Z ddlmZmZ ddlZddlZddlmZ ddlm Z ddl
mZ dd� ZG d d
� d
e�Z
dS )z0
Test cases covering L{twisted.python.zippath}.
� )�absolute_import�divisionN)�AbstractFilePathTests)�
ZipArchive)�_coerceToFilesystemEncodingc C s� t d| �} t d|�}t�|d��^}t�| �D ]L\}}}|D ]<}tj�||�}tj�||�t| �d d� }|�||� q:q,W 5 Q R X dS )zI
Create a zipfile on zfname, containing the contents of dirname'
� �w� N) r �zipfileZZipFile�os�walk�path�join�len�write) �dirnameZzfnameZzf�rootZignored�files�fname�fspathZarcpath� 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>- s �z*ZipFilePathTests.setUp.<locals>.<listcomp>)
r �setUpr r r � nativecmnr r
r �allr r r r r"