Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4842efc commit 886455cCopy full SHA for 886455c
1 file changed
Lib/test/test_subprocess.py
@@ -1273,8 +1273,18 @@ def test_pipe_cloexec_real_tools(self):
1273
1274
self.addCleanup(p1.wait)
1275
self.addCleanup(p2.wait)
1276
- self.addCleanup(p1.terminate)
1277
- self.addCleanup(p2.terminate)
+ def kill_p1():
+ try:
1278
+ p1.terminate()
1279
+ except ProcessLookupError:
1280
+ pass
1281
+ def kill_p2():
1282
1283
+ p2.terminate()
1284
1285
1286
+ self.addCleanup(kill_p1)
1287
+ self.addCleanup(kill_p2)
1288
1289
p1.stdin.write(data)
1290
p1.stdin.close()
0 commit comments