Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.10/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.10/test/__pycache__/test_getopt.cpython-310.pyc
o

�9j �@s\ddlmZmZddlmZddlZddlZe�ZGdd�dej	�Z
edkr,e��dSdS)�)�verbose�run_doctest)�EnvironmentVarGuardNc@sdeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�GetoptTestscCs"t�|_d|jvr|jd=dSdS)N�POSIXLY_CORRECT)r�env��self�r
�'/usr/lib/python3.10/test/test_getopt.py�setUp
s
�zGetoptTests.setUpcCs|j��|`dS�N)r�__exit__rr
r
r�tearDowns
zGetoptTests.tearDowncOs|jtjg|�Ri|��dSr
)�assertRaises�getopt�GetoptError)r	�args�kwargsr
r
r�assertErrorszGetoptTests.assertErrorcCs8|�t�dd��|�t�dd��|�tjdd�dS)N�a�a:�b)�
assertTruer�
short_has_arg�assertFalserrr
r
r�test_short_has_argszGetoptTests.test_short_has_argcCs�t�ddg�\}}|�|�|�|d�t�ddg�\}}|�|�|�|d�t�ddg�\}}|�|�|�|d�|�tjddg�|�tjdg�|�tjdddg�dS)N�abc�abc=�abcd�def�abcde)r�
long_has_argsr�assertEqualrr)r	�has_arg�optionr
r
r�test_long_has_argss


zGetoptTests.test_long_has_argscCs�t�gddg�\}}|�|dg�|�|g�t�gddg�\}}|�|dg�|�|g�t�gdddg�\}}|�|dg�|�|g�t�gddddg�\}}|�|dg�|�|dg�|�tjgddg�|�tjgddg�dS)Nr��-a��a1r�r(�1r,�2)r�	do_shortsr#r�r	�optsrr
r
r�test_do_shorts/szGetoptTests.test_do_shortscCs$t�gddgg�\}}|�|dg�|�|g�t�gddgg�\}}|�|dg�|�|g�t�gddgg�\}}|�|dg�|�|g�t�gdgd�g�\}}|�|dg�|�|g�t�gd	d
dgg�\}}|�|dg�|�|g�|�tjgddgg�|�tjgddgg�dS)
Nr)�--abcr)zabc=1r)r2r,zabcd=)z--abcdr,)�abrrzfoo=42zfoo-barzfoo=)z--foo�42)r�do_longsr#rr/r
r
r�
test_do_longsGs"zGetoptTests.test_do_longscCsXgd�}t�|dddg�\}}|�|gd��|�|ddg�|�tj|dddg�dS)	N)r(r,�-bz	--alpha=2�--betar(�3r(r)r8�arg1�arg2za:bzalpha=�beta)r+)r7r))�--alphar-�r8r))r(r9r'r>r:r;�alpha)rr#r�r	�cmdliner0rr
r
r�test_getoptbs
zGetoptTests.test_getoptcCs�gd�}t�|dddg�\}}|�|dg�|�|gd��t�gd�dg�\}}|�|dg�|�|d	d
g�t�|dddg�\}}|�|d	g�|�|gd��d
|jd<t�|dddg�\}}|�|d	g�|�|gd��dS)N)r(r:r7r,r=�--beta=2zab:r?zbeta=r:)r')r7r,)r=r))r8r-)r(�-r7rDrDr')r7rDz+ab:)r:r7r,r=rCr,r)r�
gnu_getoptr#rr@r
r
r�test_gnu_getoptss
zGetoptTests.test_gnu_getoptcCs&d}ddl}|�d|�}t|t�dS)Na�
        Examples from the Library Reference:  Doc/lib/libgetopt.tex

        An example using only Unix style options:


        >>> import getopt
        >>> args = '-a -b -cfoo -d bar a1 a2'.split()
        >>> args
        ['-a', '-b', '-cfoo', '-d', 'bar', 'a1', 'a2']
        >>> optlist, args = getopt.getopt(args, 'abc:d:')
        >>> optlist
        [('-a', ''), ('-b', ''), ('-c', 'foo'), ('-d', 'bar')]
        >>> args
        ['a1', 'a2']

        Using long option names is equally easy:


        >>> s = '--condition=foo --testing --output-file abc.def -x a1 a2'
        >>> args = s.split()
        >>> args
        ['--condition=foo', '--testing', '--output-file', 'abc.def', '-x', 'a1', 'a2']
        >>> optlist, args = getopt.getopt(args, 'x', [
        ...     'condition=', 'output-file=', 'testing'])
        >>> optlist
        [('--condition', 'foo'), ('--testing', ''), ('--output-file', 'abc.def'), ('-x', '')]
        >>> args
        ['a1', 'a2']
        r�
libreftest)�types�
ModuleTyperr)r	�srH�mr
r
r�test_libref_examples�sz GetoptTests.test_libref_examplescCsft�dgddg�\}}|�|dg�t�dgddg�\}}|�|dg�|�tjtjdgddg�dS)Nz--help=r)zhelp=)�--helpr)z--help=x)rM�x�help)rr#rr)r	�longopts�	shortoptsr
r
r�test_issue4629�s
zGetoptTests.test_issue4629N)�__name__�
__module__�__qualname__rrrrr&r1r6rBrFrLrRr
r
r
rrs$r�__main__)
�test.supportrr�test.support.os_helperr�unittestr�object�sentinel�TestCaserrS�mainr
r
r
r�<module>s-�

Youez - 2016 - github.com/yon3zu
LinuXploit