tests: get rid of some more shell

issue260
David Wilson 6 years ago
parent 026710cb28
commit 332d128651

@ -0,0 +1,13 @@
#!/usr/bin/env python
# I produce text every 100ms, for testing mitogen.core.iter_read()
import sys
import time
i = 0
while True:
i += 1
sys.stdout.write(str(i))
sys.stdout.flush()
time.sleep(0.1)

@ -1,10 +0,0 @@
#!/bin/bash
# I produce text every 100ms, for testing mitogen.core.iter_read()
i=0
while :; do
i=$(($i + 1))
echo "$i"
sleep 0.1
done

@ -215,7 +215,7 @@ class IterReadTest(unittest2.TestCase):
func = staticmethod(mitogen.parent.iter_read) func = staticmethod(mitogen.parent.iter_read)
def make_proc(self): def make_proc(self):
args = [testlib.data_path('iter_read_generator.sh')] args = [testlib.data_path('iter_read_generator.py')]
proc = subprocess.Popen(args, stdout=subprocess.PIPE) proc = subprocess.Popen(args, stdout=subprocess.PIPE)
mitogen.core.set_nonblock(proc.stdout.fileno()) mitogen.core.set_nonblock(proc.stdout.fileno())
return proc return proc

Loading…
Cancel
Save