()
| 838 | |
| 839 | |
| 840 | def test_execute_repl(): |
| 841 | with temporary_dir() as pex_chroot: |
| 842 | pex_builder = PEXBuilder(path=pex_chroot) |
| 843 | pex_builder.freeze() |
| 844 | process = PEX(pex_chroot).run( |
| 845 | args=[], |
| 846 | stdout=subprocess.PIPE, |
| 847 | stderr=subprocess.PIPE, |
| 848 | stdin=subprocess.PIPE, |
| 849 | blocking=False, |
| 850 | ) |
| 851 | commands = dedent( |
| 852 | """ |
| 853 | assert False |
| 854 | 20 + 103 |
| 855 | quit() |
| 856 | """ |
| 857 | ) |
| 858 | stdout, stderr = process.communicate(input=commands.encode("utf-8")) |
| 859 | |
| 860 | assert stderr.startswith(EXPECTED_REPL_BANNER_NO_DEPS), stderr |
| 861 | assert b"AssertionError" in stderr |
| 862 | assert b">>> " in stdout |
| 863 | assert b"123" in stdout |
| 864 | assert 0 == process.returncode |
| 865 | |
| 866 | |
| 867 | def test_execute_repl_with_python_options(): |
nothing calls this directly
no test coverage detected