diff --git a/AUTHORS b/AUTHORS index c8da37c..8d1d3fd 100644 --- a/AUTHORS +++ b/AUTHORS @@ -70,3 +70,4 @@ Thanks To * Edward George, finding and fixing an issue in the [e]poll hubs (#74) * Ruijun Luo, figuring out incorrect openssl import for wrap_ssl (#73) * rfk, patch to get green zmq to respect noblock flag. +* Soren Hansen, finding and fixing issue in subprocess (#77) diff --git a/tests/patcher_test.py b/tests/patcher_test.py index 466b385..e1dabc4 100644 --- a/tests/patcher_test.py +++ b/tests/patcher_test.py @@ -279,5 +279,19 @@ import time self.assertEqual(len(lines), 2, "\n".join(lines)) +class Subprocess(ProcessBase): + def test_monkeypatched_subprocess(self): + new_mod = """import eventlet +eventlet.monkey_patch() +from eventlet.green import subprocess + +subprocess.Popen(['/bin/true'], stdin=subprocess.PIPE) +print "done" +""" + self.write_to_tempfile("newmod", new_mod) + output, lines = self.launch_subprocess('newmod') + self.assertEqual(output, "done\n", output) + + if __name__ == '__main__': main()