()
| 307 | |
| 308 | |
| 309 | def test_pex_run(): |
| 310 | # type: () -> None |
| 311 | with named_temporary_file() as fake_stdout: |
| 312 | with temporary_dir() as temp_dir: |
| 313 | pex = write_simple_pex( |
| 314 | temp_dir, |
| 315 | 'import sys; sys.stdout.write("hello"); sys.stderr.write("hello"); sys.exit(0)', |
| 316 | ) |
| 317 | rc = PEX(pex.path()).run(stdin=None, stdout=fake_stdout, stderr=fake_stdout) |
| 318 | assert rc == 0 |
| 319 | |
| 320 | fake_stdout.seek(0) |
| 321 | assert fake_stdout.read() == b"hellohello" |
| 322 | |
| 323 | |
| 324 | def test_pex_run_extra_sys_path(): |
nothing calls this directly
no test coverage detected