view src/testdir/test_channel_write.py @ 31249:1d3caf811eb5 v9.0.0958

patch 9.0.0958: messages test is flaky Commit: https://github.com/vim/vim/commit/19cf525c20f9915ffcddda35c27608528f6af047 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 27 14:39:31 2022 +0000 patch 9.0.0958: messages test is flaky Problem: Messages test is flaky. Solution: Add a short delay.
author Bram Moolenaar <Bram@vim.org>
date Sun, 27 Nov 2022 15: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