diff --git a/tests/data/iter_read_generator.py b/tests/data/iter_read_generator.py new file mode 100755 index 00000000..3fd3c08c --- /dev/null +++ b/tests/data/iter_read_generator.py @@ -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) diff --git a/tests/data/iter_read_generator.sh b/tests/data/iter_read_generator.sh deleted file mode 100755 index 3aa6d6ac..00000000 --- a/tests/data/iter_read_generator.sh +++ /dev/null @@ -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 diff --git a/tests/parent_test.py b/tests/parent_test.py index aaf335b8..c0c542f4 100644 --- a/tests/parent_test.py +++ b/tests/parent_test.py @@ -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