diff --git a/tests/test_terminal.py b/tests/test_terminal.py index f17dd24f0..680aa2373 100644 --- a/tests/test_terminal.py +++ b/tests/test_terminal.py @@ -58,8 +58,10 @@ def test_save(self): self.terminal.disable_nonblocking_io() self.assertNotEquals(flags, self.terminal.orig_flags) self.terminal.reset() - flags = self.terminal.orig_flags + flags = fcntl.fcntl(self.terminal.fd, fcntl.F_GETFL) self.assertEquals(flags, self.terminal.orig_flags) + self.terminal.disable_nonblocking_io() + self.terminal.save() def test_save_and_restore_with_dict(self): self.terminal.enable_nonblocking_io() @@ -71,6 +73,7 @@ def test_save_and_restore_with_dict(self): self.terminal.reset(orig_settings) flags = fcntl.fcntl(self.terminal.fd, fcntl.F_GETFL) self.assertEquals(flags, orig_settings.get('flags')) + self.terminal.disable_nonblocking_io() def test_reset(self): self.terminal.enable_nonblocking_io()