Skip to content

Commit

Permalink
Fix unit test issues on Linux/Windows from last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ronf committed May 28, 2024
1 parent 1bbd845 commit 43bcd2d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async def _handle_client(process):
'%sx%s' % (exc.width, exc.height))
elif action == 'term_size_tty':
master, slave = os.openpty()
await process.redirect_stdin(master)
await process.redirect_stdin(master, recv_eof=False)
process.stdout.write(b'\n')

await process.stdin.readline()
Expand Down Expand Up @@ -672,7 +672,7 @@ async def test_forward_terminal_size(self):
self.assertEqual(result.exit_signal[2], '80x24')

@unittest.skipIf(sys.platform == 'win32',
'skip fcntl/termios test on Windows')
'skip TTY terminal size tests on Windows')
@asynctest
async def test_forward_terminal_size_tty(self):
"""Test forwarding a terminal size change to a remote tty"""
Expand All @@ -687,6 +687,8 @@ async def test_forward_terminal_size_tty(self):

self.assertEqual(result.stdout, '80x24')

@unittest.skipIf(sys.platform == 'win32',
'skip TTY terminal size tests on Windows')
@asynctest
async def test_forward_terminal_size_nontty(self):
"""Test forwarding a terminal size change to a remote non-tty"""
Expand Down

0 comments on commit 43bcd2d

Please sign in to comment.