PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Dir : /opt/imh-python/lib/python2.7/test/ |
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 IP: 209.182.202.254 |
Dir : //opt/imh-python/lib/python2.7/test/test_openpty.py |
# Test to see if openpty works. (But don't worry if it isn't available.) import os, unittest from test.test_support import run_unittest if not hasattr(os, "openpty"): raise unittest.SkipTest, "No openpty() available." class OpenptyTest(unittest.TestCase): def test(self): master, slave = os.openpty() self.addCleanup(os.close, master) self.addCleanup(os.close, slave) if not os.isatty(slave): self.fail("Slave-end of pty is not a terminal.") os.write(slave, 'Ping!') self.assertEqual(os.read(master, 1024), 'Ping!') def test_main(): run_unittest(OpenptyTest) if __name__ == '__main__': test_main()