tests: get rid of some more shell

This commit is contained in:
David Wilson 2018-10-30 23:06:32 +00:00
parent 026710cb28
commit 332d128651
3 changed files with 14 additions and 11 deletions

View File

@ -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)

View File

@ -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

View File

@ -215,7 +215,7 @@ class IterReadTest(unittest2.TestCase):
func = staticmethod(mitogen.parent.iter_read)
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)
mitogen.core.set_nonblock(proc.stdout.fileno())
return proc