Add a system test for PEP-519 resolution
for command line arguments and working directory
Markus Gerstel
4 years ago
51 | 51 | assert result["exitcode"] == 0 |
52 | 52 | assert b"http" in result["stderr"] |
53 | 53 | assert b"google" in result["stdout"] |
54 | ||
55 | ||
56 | def test_path_object_resolution(tmpdir): | |
57 | sentinel_value = "sentinel" | |
58 | tmpdir.join("tempfile").write(sentinel_value) | |
59 | tmpdir.join("reader.py").write("print(open('tempfile').read())") | |
60 | command = ["python", tmpdir.join("reader.py")] | |
61 | result = procrunner.run(command, working_directory=tmpdir) | |
62 | assert result["exitcode"] == 0 | |
63 | assert not result["stderr"] | |
64 | assert sentinel_value == result["stdout"].strip() |