Handle host output from started sessions immediately

This commit is contained in:
Andrew Kay
2023-01-03 21:28:58 -06:00
parent 2c1dcedf9c
commit 5fc896be2e
2 changed files with 35 additions and 14 deletions

View File

@@ -73,7 +73,7 @@ class UpdateSessionsTestCase(unittest.TestCase):
self.controller.session_selector.select.return_value = []
self.perf_counter.side_effect = [0, 0.1, 0.2]
self.perf_counter.side_effect = [0, 0.1, 0.2, 0.3, 0.4]
# Act
self.controller._update_sessions(1.0)
@@ -83,6 +83,9 @@ class UpdateSessionsTestCase(unittest.TestCase):
self.controller.session_selector.register.assert_called_once_with(session, selectors.EVENT_READ)
session.handle_host.assert_called_once()
session.render.assert_called_once()
def test_terminated_sessions_are_removed(self):
# Arrange
device = create_autospec(Terminal, instance=True)