diff options
Diffstat (limited to 'Lib/test/test_openpty.py')
-rw-r--r-- | Lib/test/test_openpty.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_openpty.py b/Lib/test/test_openpty.py index 20c4fe239c2..e8175ff094d 100644 --- a/Lib/test/test_openpty.py +++ b/Lib/test/test_openpty.py @@ -1,10 +1,10 @@ # 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 +from test.support import run_unittest if not hasattr(os, "openpty"): - raise unittest.SkipTest, "No openpty() available." + raise unittest.SkipTest("No openpty() available.") class OpenptyTest(unittest.TestCase): @@ -13,8 +13,8 @@ class OpenptyTest(unittest.TestCase): 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!') + os.write(slave, b'Ping!') + self.assertEqual(os.read(master, 1024), b'Ping!') def test_main(): run_unittest(OpenptyTest) |