def test_setwinsize():
    pty = pty_fixture()
    pty.setwinsize(50, 110)
    assert pty.getwinsize() == (50, 110)
    pty.terminate()

    pty = PtyProcess.spawn('cmd', dimensions=(60, 120))
    assert pty.getwinsize() == (60, 120)
    pty.terminate()
def pty_fixture(cmd=None, env=None):
    cmd = cmd or 'cmd'
    return PtyProcess.spawn(cmd, env=env)
Exemple #3
0
 def _pty_factory(cmd=None, env=None):
     cmd = cmd or 'cmd'
     return PtyProcess.spawn(cmd, env=env)