()
| 804 | |
| 805 | |
| 806 | def test_execute_interpreter_file_program(): |
| 807 | # type: () -> None |
| 808 | with temporary_dir() as pex_chroot: |
| 809 | pex_builder = PEXBuilder(path=pex_chroot) |
| 810 | pex_builder.freeze() |
| 811 | with tempfile.NamedTemporaryFile() as fp: |
| 812 | fp.write(b'import sys; print(" ".join(sys.argv))') |
| 813 | fp.flush() |
| 814 | process = PEX(pex_chroot).run( |
| 815 | args=[fp.name, "one", "two"], |
| 816 | stdout=subprocess.PIPE, |
| 817 | stderr=subprocess.PIPE, |
| 818 | blocking=False, |
| 819 | ) |
| 820 | stdout, stderr = process.communicate() |
| 821 | |
| 822 | assert 0 == process.returncode |
| 823 | assert "{} one two\n".format(fp.name).encode("utf-8") == stdout |
| 824 | assert b"" == stderr |
| 825 | |
| 826 | |
| 827 | EXPECTED_REPL_BANNER_NO_DEPS = ( |
nothing calls this directly
no test coverage detected