[Python-checkins] cpython (merge 3.3 -> default): Closes #19665: Merged fi from 3.3.

vinay.sajip python-checkins at python.org
Tue Dec 3 12:30:08 CET 2013


http://hg.python.org/cpython/rev/bfd45dc46569
changeset: 87735:bfd45dc46569
parent: 87733:6e09ca4d61df
parent: 87734:4c5fc9f08b4d
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Tue Dec 03 11:29:45 2013 +0000
summary:
 Closes #19665: Merged fi from 3.3.
files:
 Lib/test/test_logging.py | 6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -912,19 +912,21 @@
 
 @unittest.skipUnless(threading, 'Threading required for this test.')
 class SMTPHandlerTest(BaseTest):
+ TIMEOUT = 8.0
 def test_basic(self):
 sockmap = {}
 server = TestSMTPServer(('localhost', 0), self.process_message, 0.001,
 sockmap)
 server.start()
 addr = ('localhost', server.port)
- h = logging.handlers.SMTPHandler(addr, 'me', 'you', 'Log', timeout=5.0)
+ h = logging.handlers.SMTPHandler(addr, 'me', 'you', 'Log',
+ timeout=self.TIMEOUT)
 self.assertEqual(h.toaddrs, ['you'])
 self.messages = []
 r = logging.makeLogRecord({'msg': 'Hello'})
 self.handled = threading.Event()
 h.handle(r)
- self.handled.wait(5.0) # 14314: don't wait forever
+ self.handled.wait(self.TIMEOUT) # 14314: don't wait forever
 server.stop()
 self.assertTrue(self.handled.is_set())
 self.assertEqual(len(self.messages), 1)
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /