()
| 760 | |
| 761 | |
| 762 | def test_execute_interpreter_stdin_program(): |
| 763 | # type: () -> None |
| 764 | with temporary_dir() as pex_chroot: |
| 765 | pex_builder = PEXBuilder(path=pex_chroot) |
| 766 | pex_builder.freeze() |
| 767 | process = PEX(pex_chroot).run( |
| 768 | args=["-", "one", "two"], |
| 769 | stdout=subprocess.PIPE, |
| 770 | stderr=subprocess.PIPE, |
| 771 | stdin=subprocess.PIPE, |
| 772 | blocking=False, |
| 773 | ) |
| 774 | stdout, stderr = process.communicate(input=b'import sys; print(" ".join(sys.argv))') |
| 775 | |
| 776 | assert 0 == process.returncode |
| 777 | assert b"- one two\n" == stdout |
| 778 | assert b"" == stderr |
| 779 | |
| 780 | |
| 781 | def test_execute_interpreter_stdin_program_with_python_options(): |
nothing calls this directly
no test coverage detected