403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/__pycache__/test_getopt.cpython-36.opt-2.pyc
3

�
�^��@sPddlmZmZmZddlZddlZe�ZGdd�dej�Z	e
dkrLej�dS)�)�verbose�run_doctest�EnvironmentVarGuardNc@sdeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�GetoptTestscCst�|_d|jkr|jd=dS)N�POSIXLY_CORRECT)r�env)�self�r	�0/opt/alt/python36/lib64/python3.6/test_getopt.py�setUps
zGetoptTests.setUpcCs|jj�|`dS)N)r�__exit__)rr	r	r
�tearDowns
zGetoptTests.tearDowncOs|jtjf|�|�dS)N)�assertRaises�getopt�GetoptError)r�args�kwargsr	r	r
�assertErrorszGetoptTests.assertErrorcCs8|jtjdd��|jtjdd��|jtjdd�dS)N�aza:�b)�
assertTruerZ
short_has_arg�assertFalser)rr	r	r
�test_short_has_argszGetoptTests.test_short_has_argcCs�tjddg�\}}|j|�|j|d�tjddg�\}}|j|�|j|d�tjddg�\}}|j|�|j|d�|jtjddg�|jtjdg�|jtjdddg�dS)N�abczabc=�abcd�defZabcde)rZ
long_has_argsr�assertEqualrr)rZhas_arg�optionr	r	r
�test_long_has_argss


zGetoptTests.test_long_has_argscCs�tjgddg�\}}|j|dg�|j|g�tjgddg�\}}|j|d	g�|j|g�tjgdddg�\}}|j|d
g�|j|g�tjgddddg�\}}|j|dg�|j|dg�|jtjgddg�|jtjgddg�dS)Nr�-a�Za1za:�1�2)rr )rr!)rr!)rr!)rZ	do_shortsrr)r�optsrr	r	r
�test_do_shorts.szGetoptTests.test_do_shortscCs&tjgddgg�\}}|j|dg�|j|g�tjgddgg�\}}|j|dg�|j|g�tjgddgg�\}}|j|dg�|j|g�tjgdd	dd
gg�\}}|j|dg�|j|g�tjgddd
gg�\}}|j|dg�|j|g�|jtjgddgg�|jtjgddgg�dS)Nr�--abcr zabc=1zabc=r!zabcd=�--abcdZabrzfoo=42zfoo-barzfoo=�--foo�42)r%r )r%r!)r&r!)r%r )r'r()rZdo_longsrr)rr#rr	r	r
�
test_do_longsFs"zGetoptTests.test_do_longscCsvdddddddddddd	g}tj|d
ddg�\}}|j|dddddddg�|j|dd	g�|jtj|d
ddg�dS)N�-ar!�-bz	--alpha=2�--beta�3r �arg1Zarg2za:bzalpha=Zbeta�--alphar"�alpha)r*r!)r+r )r/r")r,r )r*r-)r*r )r,r )rrr)r�cmdliner#rr	r	r
�test_getoptas
zGetoptTests.test_getoptcCsddddddg}tj|ddd	g�\}}|j|dg�|j|ddddg�tjdd
dd
gdg�\}}|j|d
g�|j|ddg�tj|ddd	g�\}}|j|dg�|j|dddddg�d|jd<tj|ddd	g�\}}|j|dg�|j|dddddg�dS)N�-ar.�-br!�--alphaz--beta=2zab:r0zbeta=r �--betar"�-z+ab:r)r3r )r4r!)r5r )r6r")r3r )r4r7)r3r )r3r )rZ
gnu_getoptrr)rr1r#rr	r	r
�test_gnu_getoptrs


zGetoptTests.test_gnu_getoptcCs&d}ddl}|jd|�}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']
        rZ
libreftest)�types�
ModuleTyperr)r�sr9�mr	r	r
�test_libref_examples�sz GetoptTests.test_libref_examplescCsftjdgddg�\}}|j|dg�tjdgddg�\}}|j|d	g�|jtjtjdgddg�dS)
Nz--help=r zhelp=�--helpz--help=x�x�help)r>r )r>r?)rrrr)rZlongoptsZ	shortoptsr	r	r
�test_issue4629�s
zGetoptTests.test_issue4629N)�__name__�
__module__�__qualname__rr
rrrr$r)r2r8r=rAr	r	r	r
rs$r�__main__)Ztest.supportrrrZunittestr�object�sentinelZTestCaserrB�mainr	r	r	r
�<module>s-

Youez - 2016 - github.com/yon3zu
LinuXploit