Fix test_openpty.
diff --git a/Lib/test/test_openpty.py b/Lib/test/test_openpty.py
index 6471f58..cc9e907 100644
--- a/Lib/test/test_openpty.py
+++ b/Lib/test/test_openpty.py
@@ -13,8 +13,8 @@
         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)