tests: Pythonize write_all_consumer.py
This commit is contained in:
parent
f53e7dd637
commit
48e8f1f7aa
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env python
|
||||
# I consume 65535 bytes every 10ms, for testing mitogen.core.write_all()
|
||||
|
||||
import os
|
||||
import time
|
||||
|
||||
while True:
|
||||
os.read(0, 65535)
|
||||
time.sleep(0.01)
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/bash
|
||||
# I consume 65535 bytes every 10ms, for testing mitogen.core.write_all()
|
||||
|
||||
while :; do
|
||||
read -n 65535
|
||||
sleep 0.01
|
||||
done
|
|
@ -267,7 +267,7 @@ class WriteAllTest(unittest2.TestCase):
|
|||
func = staticmethod(mitogen.parent.write_all)
|
||||
|
||||
def make_proc(self):
|
||||
args = [testlib.data_path('write_all_consumer.sh')]
|
||||
args = [testlib.data_path('write_all_consumer.py')]
|
||||
proc = subprocess.Popen(args, stdin=subprocess.PIPE)
|
||||
mitogen.core.set_nonblock(proc.stdin.fileno())
|
||||
return proc
|
||||
|
|
Loading…
Reference in New Issue