Test for Soren's subprocess fix. Fixes #77
This commit is contained in:
1
AUTHORS
1
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)
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user