AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/twisted/python/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/lib/python3/dist-packages/twisted/python/test/__pycache__/test_zippath.cpython-310.pyc
o

�b-
�@sTdZddlZddlZddlmZddlmZddlmZdd�Z	Gdd	�d	e�Z
dS)
z0
Test cases covering L{twisted.python.zippath}.
�N)�_coerceToFilesystemEncoding)�
ZipArchive)�AbstractFilePathTestsc	Cs�td|�}td|�}t�|d��5}t�|�D]&\}}}|D]}tj�||�}tj�||�t|�dd�}|�||�qqWd�dS1sHwYdS)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�zipits

���"�rc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�ZipFilePathTestszk
    Test various L{ZipPath} path manipulations as well as reprs for L{ZipPath}
    and L{ZipArchive}.
    cs\t���t�j�jd�td�j��_t�jd��_�j�_�fdd��j	D��_	dS)N�.ziprcs g|]}|��j�jd��qS)r)�replace�cmn)�.0�x��selfrr�
<listcomp>0s z*ZipFilePathTests.setUp.<locals>.<listcomp>)
r�setUprrr�	nativecmnrrr�allr"rr"rr%*s
zZipFilePathTests.setUpcCs�|j�d�}d�tj�|jdtjd��}|�t|�|�|j�	t�
�tjdd�d}t|�}|�d�}|�t|�|�dS)z�
        Make sure that invoking ZipPath's repr prints the correct class name
        and an absolute path to the zip file.
        �fooz
ZipPath({!r})�.ziprrN)r�child�formatr
�abspathr&�sep�assertEqual�reprr�getcwdr)r#r*�pathRepr�relativeCommon�relpathrrr�test_zipPathRepr2s�
z!ZipFilePathTests.test_zipPathReprcCsJ|j�d��d��d�}d|jdtj�gd��}|�t|�|�dS)z�
        The repr of a ZipPath with C{".."} in the internal part of its path
        includes the C{".."} rather than applying the usual parent directory
        meaning.
        r(�..�barzZipPath(%r)r))rr(r5r6N)rr*r&r
r-r
r.r/)r#r*r1rrr� test_zipPathReprParentDirSegmentGs
�z1ZipFilePathTests.test_zipPathReprParentDirSegmentcCspt|jd�}d�tj�|jd��}|�t|�|�|j�t�	�tj
dd�d}t|�}|�t|�|�dS)z�
        Make sure that invoking ZipArchive's repr prints the correct class
        name and an absolute path to the zip file.
        r)zZipArchive({!r})rrN)rr&r+r
rr,r.r/rr0r-)r#rr1r2r3rrr�test_zipArchiveReprSsz$ZipFilePathTests.test_zipArchiveReprN)�__name__�
__module__�__qualname__�__doc__r%r4r7r8rrrrr$sr)r<r
r�twisted.python.filepathr�twisted.python.zippathr�twisted.test.test_pathsrrrrrrr�<module>s

Anon7 - 2022
AnonSec Team