test_asynchat is no longer expected to produce output.

also, wait for threads to finish before proceeding.
This commit is contained in:
Michael W. Hudson 2005-06-20 13:45:34 +00:00
parent 7b279078c0
commit 7390942aa1
2 changed files with 3 additions and 4 deletions

View File

@ -1,3 +0,0 @@
test_asynchat
Connected
Received: 'hello world'

View File

@ -6,7 +6,7 @@ import unittest
from test import test_support from test import test_support
HOST = "127.0.0.1" HOST = "127.0.0.1"
PORT = 54321 PORT = 54322
class echo_server(threading.Thread): class echo_server(threading.Thread):
@ -67,6 +67,7 @@ class TestAsynchat(unittest.TestCase):
c.push("hello ") c.push("hello ")
c.push("world\n") c.push("world\n")
asyncore.loop() asyncore.loop()
s.join()
self.assertEqual(c.contents, 'hello world') self.assertEqual(c.contents, 'hello world')
@ -79,6 +80,7 @@ class TestAsynchat(unittest.TestCase):
c.push("hello ") c.push("hello ")
c.push("world\n") c.push("world\n")
asyncore.loop() asyncore.loop()
s.join()
self.assertEqual(c.contents, 'hello ') self.assertEqual(c.contents, 'hello ')