summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2011-05-02 16:31:17 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2011-05-02 16:31:17 (GMT)
commit09a98a99cdb39b977ed49d927760bb58787a037b (patch)
tree4a557dee8112ef76b1d7a5a6ee4f61d81e496c1a /Lib/test
parent03163ac185a8fdf7a1569f19a6d60e2b6259cc13 (diff)
parent72c53b5dccb02f7a14edbfa4a197827b29e454e9 (diff)
downloadcpython-09a98a99cdb39b977ed49d927760bb58787a037b.zip
cpython-09a98a99cdb39b977ed49d927760bb58787a037b.tar.gz
cpython-09a98a99cdb39b977ed49d927760bb58787a037b.tar.bz2
merge
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_logging.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 96f8215..bf0ad77 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -1385,7 +1385,10 @@ class DatagramHandlerTest(BaseTest):
logger = logging.getLogger("udp")
logger.error("spam")
self.handled.wait()
- self.assertEqual(self.log_output, "spam\n")
+ self.handled.clear()
+ logger.error("eggs")
+ self.handled.wait()
+ self.assertEqual(self.log_output, "spam\neggs\n")
@unittest.skipUnless(threading, 'Threading required for this test.')
@@ -2631,6 +2634,8 @@ class QueueHandlerTest(BaseTest):
self.assertEqual(data.name, self.que_logger.name)
self.assertEqual((data.msg, data.args), (msg, None))
+ @unittest.skipUnless(hasattr(logging.handlers, 'QueueListener'),
+ 'logging.handlers.QueueListener required for this test')
def test_queue_listener(self):
handler = TestHandler(Matcher())
listener = logging.handlers.QueueListener(self.queue, handler)