Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4810)

Unified Diff: Lib/test/test_subprocess.py

Issue 12044: subprocess.Popen.__exit__ doesn't wait for process end
Patch Set: Created 2 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/subprocess.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_subprocess.py Wed May 11 22:37:50 2011 +0800
+++ b/Lib/test/test_subprocess.py Wed May 11 18:35:39 2011 +0200
@@ -1590,7 +1590,8 @@
def test_returncode(self):
with subprocess.Popen([sys.executable, "-c",
"import sys; sys.exit(100)"]) as proc:
- proc.wait()
+ pass
+ # __exit__ calls wait(), so the returncode should be set
self.assertEqual(proc.returncode, 100)
def test_communicate_stdin(self):
« no previous file with comments | « Lib/subprocess.py ('k') | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7