← Back
Editing: utils.cpython-311.pyc
� �Ucu � �4 � d dl Z d dlmZmZ d� Zdd�Zdd�ZdS )� N)�PIPE�Popenc �� � t | t t �� � }|� � � \ }}|� dd� � }|� dd� � }|||j fS )z8Get stdout, stderr, and exit code from running a command)�stdout�stderr�utf8�replace)r r �communicate�decode� returncode)�cmd�p�out�errs �7/usr/lib/python3/dist-packages/traitlets/tests/utils.py�get_output_error_coder s\ � � �c�$�t�,�,�,�A��}�}���H�C�� �*�*�V�Y� '� '�C� �*�*�V�Y� '� '�C���Q�\�!�!� c �� � t j d| g}|r|� |� � |� d� � t |� � \ }}}|dk s J |� � �d|vsJ �d|v sJ �d|v sJ �||fS )z/test that `python -m PKG [subcommand] -h` works�-mz-hr � Traceback�Options� --help-all��sys� executable�extend�appendr ��pkg� subcommandr r r �rcs r �check_help_outputr"