diff options
| author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-21 00:20:36 (GMT) |
|---|---|---|
| committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-21 00:20:36 (GMT) |
| commit | 9904b22b78624174f1e0d06b7e2aed019bfeb550 (patch) | |
| tree | 14c34cfb3644ae5a1d1112bcbf67d3398396d9e3 /Lib/packaging/tests/test_util.py | |
| parent | 32565b6c02e9673f9f9368f233e862dfc8a702c9 (diff) | |
| download | cpython-9904b22b78624174f1e0d06b7e2aed019bfeb550.zip cpython-9904b22b78624174f1e0d06b7e2aed019bfeb550.tar.gz cpython-9904b22b78624174f1e0d06b7e2aed019bfeb550.tar.bz2 | |
Close #12114: fix a potential deadlock in packaging.util._find_exe_version()
Avoid also zombi processes: Popen.communicate() calls its wait() method.
Diffstat (limited to 'Lib/packaging/tests/test_util.py')
| -rw-r--r-- | Lib/packaging/tests/test_util.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/packaging/tests/test_util.py b/Lib/packaging/tests/test_util.py index 4beab0f..53f6a56 100644 --- a/Lib/packaging/tests/test_util.py +++ b/Lib/packaging/tests/test_util.py @@ -74,6 +74,9 @@ class FakePopen: self.stdout = StringIO(exes[self.cmd]) self.stderr = StringIO() + def communicate(self, input=None, timeout=None): + return self.stdout.read(), self.stderr.read() + class UtilTestCase(support.EnvironRestorer, support.TempdirManager, |
