Skip to content

Commit 864db8e

Browse files
committed
Don't leak file descriptor in subprocess
1 parent c90bf59 commit 864db8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_procrunner_system.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_running_wget(tmpdir):
5757
def test_path_object_resolution(tmpdir):
5858
sentinel_value = b"sentinel"
5959
tmpdir.join("tempfile").write(sentinel_value)
60-
tmpdir.join("reader.py").write("print(open('tempfile').read())")
60+
tmpdir.join("reader.py").write("with open('tempfile') as fh:\n print(fh.read())")
6161
assert "LEAK_DETECTOR" not in os.environ
6262
result = procrunner.run(
6363
[sys.executable, tmpdir.join("reader.py")],

0 commit comments

Comments
 (0)