mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Fix test failures caused by missing/incorrect conversion to bytes.
This commit is contained in:
parent
8136014862
commit
b4df71f095
1 changed files with 4 additions and 4 deletions
|
|
@ -90,8 +90,8 @@ def line_terminator_check(self, term, server_chunk):
|
|||
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 @@ def test_empty_line(self):
|
|||
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 @@ def test_close_when_done(self):
|
|||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue