]> granicus.if.org Git - python/commitdiff
close down sockets held by asyncore at end of test; closes issue9619
authorRichard Jones <richard@commonground.com.au>
Mon, 16 Aug 2010 01:48:14 +0000 (01:48 +0000)
committerRichard Jones <richard@commonground.com.au>
Mon, 16 Aug 2010 01:48:14 +0000 (01:48 +0000)
Lib/test/test_smtpd.py

index 9d168c7604c21625971720d8ad5d58f9010db0dc..3d55bb28a19a91eb263f8bcbdac1da7ada488065 100644 (file)
@@ -45,6 +45,7 @@ class SMTPDServerTest(TestCase):
         self.assertRaises(NotImplementedError, write_line, b'spam\r\n.\r\n')
 
     def tearDown(self):
+        asyncore.close_all()
         asyncore.socket = smtpd.socket = socket
 
 
@@ -57,6 +58,7 @@ class SMTPDChannelTest(TestCase):
         self.channel = smtpd.SMTPChannel(self.server, conn, addr)
 
     def tearDown(self):
+        asyncore.close_all()
         asyncore.socket = smtpd.socket = socket
 
     def write_line(self, line):