Package list python-procrunner / d96840c
Add a system test for PEP-519 resolution for command line arguments and working directory Markus Gerstel 2 years ago
1 changed file(s) with 11 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
5151 assert result["exitcode"] == 0
5252 assert b"http" in result["stderr"]
5353 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()