view src/testdir/test_channel_write.py @ 19768:0d1088e3c53f v8.2.0440

patch 8.2.0440: terminal noblock test is still very flaky on BSD Commit: https://github.com/vim/vim/commit/d06dbf3f42c8a8a3967905dd2f2a31077af15438 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 24 10:33:00 2020 +0100 patch 8.2.0440: terminal noblock test is still very flaky on BSD Problem: Terminal noblock test is still very flaky on BSD. Solution: Increase the waiting time.
author Bram Moolenaar <Bram@vim.org>
date Tue, 24 Mar 2020 10:45:04 +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