a
    lcu                     @   s8   d dl Z d dlmZmZ dd Zd	ddZd
ddZdS )    N)PIPEPopenc                 C   s>   t | ttd}| \}}|dd}|dd}|||jfS )z8Get stdout, stderr, and exit code from running a command)stdoutstderrutf8replace)r   r   communicatedecode
returncode)cmdpouterr r   Q/var/www/html/django/DPS/env/lib/python3.9/site-packages/traitlets/tests/utils.pyget_output_error_code   s
    r   c                 C   sn   t jd| g}|r|| |d t|\}}}|dksBJ |d|vsNJ d|v sZJ d|v sfJ ||fS )z/test that `python -m PKG [subcommand] -h` works-mz-hr   	TracebackOptions
--help-allsys
executableextendappendr   pkg
subcommandr   r   r   rcr   r   r   check_help_output   s    

r   c                 C   sn   t jd| g}|r|| |d t|\}}}|dksBJ |d|vsNJ d|v sZJ d|v sfJ ||fS )z*test that `python -m PKG --help-all` worksr   r   r   r   r   zClass optionsr   r   r   r   r   check_help_all_output   s    

r    )N)N)r   
subprocessr   r   r   r   r    r   r   r   r   <module>   s   	
