view src/testdir/test_channel_write.py @ 18834:aaea9672a96d v8.1.2404

patch 8.1.2404: channel test fails under valgrind Commit: https://github.com/vim/vim/commit/08d2e795e72837a015e69894fb8ebd178e4014c9 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 7 17:10:25 2019 +0100 patch 8.1.2404: channel test fails under valgrind Problem: Channel test fails under valgrind. Solution: Sleep a bit longer.
author Bram Moolenaar <Bram@vim.org>
date Sat, 07 Dec 2019 17:15:05 +0100
parents 5cd9ba96561d
children
line wrap: on
line source

#!/usr/bin/python
#
# Program that writes a number to stdout repeatedly
#
# This requires Python 2.6 or later.

from __future__ import print_function
import sys
import time

if __name__ == "__main__":

    done = 0
    while done < 10:
        done = done + 1
        print(done)
        sys.stdout.flush()
        time.sleep(0.05)  # sleep 50 msec