diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-06-09 15:55:23 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-06-09 15:55:23 (GMT) |
commit | 8dd8d582e3c6d1dd80f5b958284fcb7260209bf3 (patch) | |
tree | 9ce41344611954ba7b0c3ad9277fa19041f6cbf1 /Lib/test/test_logging.py | |
parent | d9463b233c5fefbda3f1b9f2b37f7ff78a7c88ff (diff) | |
parent | 8168d10ea683d939ae52a1ed3d7c697c92bfae3d (diff) | |
download | cpython-8dd8d582e3c6d1dd80f5b958284fcb7260209bf3.zip cpython-8dd8d582e3c6d1dd80f5b958284fcb7260209bf3.tar.gz cpython-8dd8d582e3c6d1dd80f5b958284fcb7260209bf3.tar.bz2 |
Merged fix for issue #12168 from 3.2.
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r-- | Lib/test/test_logging.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index ceefd95..b0b8e19 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -1399,8 +1399,7 @@ class DatagramHandlerTest(BaseTest): pointing to that server's address and port.""" BaseTest.setUp(self) addr = ('localhost', 0) - self.server = server = TestUDPServer(addr, self.handle_datagram, - 0.01) + self.server = server = TestUDPServer(addr, self.handle_datagram, 0.01) server.start() server.ready.wait() self.sock_hdlr = logging.handlers.DatagramHandler('localhost', @@ -1478,6 +1477,11 @@ class SysLogHandlerTest(BaseTest): logger.error("sp\xe4m") self.handled.wait() self.assertEqual(self.log_output, b'<11>\xef\xbb\xbfsp\xc3\xa4m\x00') + self.handled.clear() + self.sl_hdlr.append_nul = False + logger.error("sp\xe4m") + self.handled.wait() + self.assertEqual(self.log_output, b'<11>\xef\xbb\xbfsp\xc3\xa4m') @unittest.skipUnless(threading, 'Threading required for this test.') |