diff --git a/tests/data/write_all_consumer.py b/tests/data/write_all_consumer.py new file mode 100755 index 00000000..4013ccdd --- /dev/null +++ b/tests/data/write_all_consumer.py @@ -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) diff --git a/tests/data/write_all_consumer.sh b/tests/data/write_all_consumer.sh deleted file mode 100755 index e6aaaf72..00000000 --- a/tests/data/write_all_consumer.sh +++ /dev/null @@ -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 diff --git a/tests/parent_test.py b/tests/parent_test.py index 24327024..9d540ccc 100644 --- a/tests/parent_test.py +++ b/tests/parent_test.py @@ -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