Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r59389:903c12dd4abe
Date: 2012-12-10 14:04 -0800
http://bitbucket.org/pypy/pypy/changeset/903c12dd4abe/

Log:    fix test_select's bytes usage

diff --git a/pypy/module/select/test/test_select.py 
b/pypy/module/select/test/test_select.py
--- a/pypy/module/select/test/test_select.py
+++ b/pypy/module/select/test/test_select.py
@@ -94,7 +94,7 @@
                 assert iwtd == [readend]
                 data = readend.recv(4096)
                 assert len(data) > 0
-                assert data == 'x' * len(data)
+                assert data == b'x' * len(data)
                 total_in += len(data)
             assert total_in == total_out
         finally:
@@ -126,7 +126,7 @@
                 data = readend.recv(4096)
                 if len(data) == 0:
                     break
-                assert data == 'x' * len(data)
+                assert data == b'x' * len(data)
                 total_in += len(data)
                 # win32: check that closing the socket exits the loop
                 if sys.platform == 'win32' and total_in == total_out:
@@ -176,7 +176,7 @@
                 assert iwtd == [readends[n]]
                 assert owtd == ewtd == []
                 data = readends[n].recv(1)
-                assert data == 'X'
+                assert data == b'X'
 
         finally:
             for fd in readends + writeends:
@@ -252,7 +252,7 @@
             def send(self, data):
                 return os.write(self.fd, data)
             def recv(self, length):
-                return os.read(self.fd, length).decode()
+                return os.read(self.fd, length)
             def close(self):
                 return os.close(self.fd)
         s1, s2 = os.pipe()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to