XBFj^ddlmZddlZddlmZddlmZmZddlm Z dd Z dddZ dddZ dS)) annotationsN)Sequence)PIPEPopen)Anycmdstr | Sequence[str]returntuple[str, str, Any]ct|tt}|\}}|dd}|dd}|||jfS)z8Get stdout, stderr, and exit code from running a command)stdoutstderrutf8replace)rr communicatedecode returncode)rpouterrout_strerr_strs CC:\PYTHON\_runtimes\venv\Lib\site-packages\traitlets/tests/utils.pyget_output_error_coder s\ c$t,,,A}}HCjj++Gjj++G GQ\ ))pkgstr subcommandSequence[str] | Nonetuple[str, str]ctjd|g}|r|||dt |\}}}|dks J|d|vsJd|vsJd|vsJ||fS)z/test that `python -m PKG [subcommand] -h` works-mz-hr TracebackOptions --help-allsys executableextendappendrrrrrrrcs rcheck_help_outputr-s >4 %C :JJt(--LCb 777C777 c ! ! ! !      3     8Orctjd|g}|r|||dt |\}}}|dks J|d|vsJd|vsJd|vsJ||fS)z*test that `python -m PKG --help-all` worksr"r%rr#r$z Class optionsr&r+s rcheck_help_all_outputr/ s >4 %C :JJ|(--LCb 777C777 c ! ! ! !      c ! ! ! ! 8Or)rr r r )N)rrrrr r ) __future__rr'collections.abcr subprocessrrtypingrrr-r/rrr5s"""""" $$$$$$""""""""****            r