diff options
| author | Sergey Shepelev <temotor@gmail.com> | 2016-01-24 23:27:52 +0500 |
|---|---|---|
| committer | Sergey Shepelev <temotor@gmail.com> | 2016-01-24 23:36:38 +0500 |
| commit | 8ea9df6b9f6a13bb47feb35bacc60968c5ce4b43 (patch) | |
| tree | a692226b8d5f74f4d584799d0ecbe8544fb3eab3 /tests/subprocess_test.py | |
| parent | a79c0ee57af25ab176e34ae7ceb27a1c0262ae5d (diff) | |
| download | eventlet-issue-290.tar.gz | |
patcher: certain order of import subprocess and monkey_patch breaks .communicate()issue-290
https://github.com/eventlet/eventlet/issues/290
Diffstat (limited to 'tests/subprocess_test.py')
| -rw-r--r-- | tests/subprocess_test.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/subprocess_test.py b/tests/subprocess_test.py index 2220c87..1f07518 100644 --- a/tests/subprocess_test.py +++ b/tests/subprocess_test.py @@ -1,8 +1,10 @@ +import sys +import time + import eventlet from eventlet.green import subprocess import eventlet.patcher -import sys -import time +import tests original_subprocess = eventlet.patcher.original('subprocess') @@ -73,3 +75,11 @@ def test_universal_lines(): stdout=subprocess.PIPE, universal_newlines=True) p.communicate(None) + + +def test_patched_communicate_290(): + # https://github.com/eventlet/eventlet/issues/290 + # Certain order of import and monkey_patch breaks subprocess communicate() + # with AttributeError module `select` has no `poll` on Linux + # unpatched methods are removed for safety reasons in commit f63165c0e3 + tests.run_isolated('subprocess_patched_communicate.py') |
