コード例 #1
0
def main():
    print('generating random sentences...')
    count = 15
    docgen = DocumentGenerator()
    terminal = Terminal(count)
    terminal.write_lines()
    terminal.hide_cursor()
    for _ in range(800):
        index = random.randint(0, count - 1)
        terminal.write_line(index, docgen.sentence())
        time.sleep(.01)
    terminal.write_lines(force=True)
    terminal.show_cursor()
コード例 #2
0
ファイル: test_terminal.py プロジェクト: soda480/mp4ansi
 def test__write_line_Should_CallExpected_When_Called(self, write_patch, *patches):
     term = Terminal(13, create=True)
     term.write_line(4, '--some-text--')
     write_patch.assert_called_once_with(4)