summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asynchat.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2007-08-29 14:56:40 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2007-08-29 14:56:40 (GMT)
commitb4df71f095e5b5de2df6d00d8320e230b5542595 (patch)
tree0d999eea18bc46f8d26825aeb3f5860c6084f1c6 /Lib/test/test_asynchat.py
parent813601486216e197069a1e2d119ea00202426bcd (diff)
downloadcpython-b4df71f095e5b5de2df6d00d8320e230b5542595.zip
cpython-b4df71f095e5b5de2df6d00d8320e230b5542595.tar.gz
cpython-b4df71f095e5b5de2df6d00d8320e230b5542595.tar.bz2
Fix test failures caused by missing/incorrect conversion to bytes.
Diffstat (limited to 'Lib/test/test_asynchat.py')
-rw-r--r--Lib/test/test_asynchat.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_asynchat.py b/Lib/test/test_asynchat.py
index be8e116..78f5868 100644
--- a/Lib/test/test_asynchat.py
+++ b/Lib/test/test_asynchat.py
@@ -90,8 +90,8 @@ class TestAsynchat(unittest.TestCase):
time.sleep(0.5) # Give server time to initialize
c = echo_client(term)
c.push(b"hello ")
- c.push(bytes("world%s" % term))
- c.push(bytes("I'm not dead yet!%s" % term))
+ c.push(bytes("world%s" % term, "ascii"))
+ c.push(bytes("I'm not dead yet!%s" % term, "ascii"))
c.push(SERVER_QUIT)
asyncore.loop(use_poll=self.usepoll, count=300, timeout=.01)
s.join()
@@ -185,7 +185,7 @@ class TestAsynchat(unittest.TestCase):
s.start()
time.sleep(0.5) # Give server time to initialize
c = echo_client(b'\n')
- c.push("hello world\n\nI'm not dead yet!\n")
+ c.push(b"hello world\n\nI'm not dead yet!\n")
c.push(SERVER_QUIT)
asyncore.loop(use_poll=self.usepoll, count=300, timeout=.01)
s.join()
@@ -198,7 +198,7 @@ class TestAsynchat(unittest.TestCase):
s.start()
time.sleep(0.5) # Give server time to initialize
c = echo_client(b'\n')
- c.push("hello world\nI'm not dead yet!\n")
+ c.push(b"hello world\nI'm not dead yet!\n")
c.push(SERVER_QUIT)
c.close_when_done()
asyncore.loop(use_poll=self.usepoll, count=300, timeout=.01)