Updated test_logging so that errors don't occur in the absence of threading.

This commit is contained in:
Vinay Sajip 2013-09-27 19:08:24 +01:00
parent f6cdffeb78
commit cb2c4fe649
1 changed files with 15 additions and 10 deletions

View File

@ -78,7 +78,6 @@ try:
except ImportError:
pass
class BaseTest(unittest.TestCase):
"""Base class for logging tests."""
@ -1366,6 +1365,7 @@ class SocketHandlerTest(BaseTest):
"""Test for SocketHandler objects."""
if threading:
server_class = TestTCPServer
address = ('localhost', 0)
@ -1450,6 +1450,7 @@ class UnixSocketHandlerTest(SocketHandlerTest):
"""Test for SocketHandler with unix sockets."""
if threading:
server_class = TestUnixStreamServer
def setUp(self):
@ -1466,6 +1467,7 @@ class DatagramHandlerTest(BaseTest):
"""Test for DatagramHandler."""
if threading:
server_class = TestUDPServer
address = ('localhost', 0)
@ -1520,6 +1522,7 @@ class UnixDatagramHandlerTest(DatagramHandlerTest):
"""Test for DatagramHandler using Unix sockets."""
if threading:
server_class = TestUnixDatagramServer
def setUp(self):
@ -1536,6 +1539,7 @@ class SysLogHandlerTest(BaseTest):
"""Test for SysLogHandler using UDP."""
if threading:
server_class = TestUDPServer
address = ('localhost', 0)
@ -1593,6 +1597,7 @@ class UnixSysLogHandlerTest(SysLogHandlerTest):
"""Test for SysLogHandler with Unix sockets."""
if threading:
server_class = TestUnixDatagramServer
def setUp(self):