summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-02 14:11:28 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-02 14:11:28 (GMT)
commitcafa2efedbaa4e0d4023e1cde48fc8f58d1a44cb (patch)
treecc6f9c4fe0df3fc7cd97ab4e3bb0772ac9fcc725 /Lib/test
parentb912c5a004068e472b1b46fad68445e70934e280 (diff)
downloadcpython-cafa2efedbaa4e0d4023e1cde48fc8f58d1a44cb.zip
cpython-cafa2efedbaa4e0d4023e1cde48fc8f58d1a44cb.tar.gz
cpython-cafa2efedbaa4e0d4023e1cde48fc8f58d1a44cb.tar.bz2
logging: don't define QueueListener if Python has no thread support
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_logging.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 6623a0f..90d293e 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -2093,6 +2093,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)