Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
cb2c4fe6
Commit
cb2c4fe6
authored
Sep 27, 2013
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated test_logging so that errors don't occur in the absence of threading.
parent
f6cdffeb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
Lib/test/test_logging.py
Lib/test/test_logging.py
+15
-10
No files found.
Lib/test/test_logging.py
View file @
cb2c4fe6
...
...
@@ -78,7 +78,6 @@ try:
except
ImportError
:
pass
class
BaseTest
(
unittest
.
TestCase
):
"""Base class for logging tests."""
...
...
@@ -1366,8 +1365,9 @@ class SocketHandlerTest(BaseTest):
"""Test for SocketHandler objects."""
server_class = TestTCPServer
address = ('localhost', 0)
if threading:
server_class = TestTCPServer
address = ('localhost', 0)
def setUp(self):
"""Set up a TCP server to receive log messages, and a SocketHandler
...
...
@@ -1450,7 +1450,8 @@ class UnixSocketHandlerTest(SocketHandlerTest):
"""Test for SocketHandler with unix sockets."""
server_class = TestUnixStreamServer
if threading:
server_class = TestUnixStreamServer
def setUp(self):
# override the definition in the base class
...
...
@@ -1466,8 +1467,9 @@ class DatagramHandlerTest(BaseTest):
"""Test for DatagramHandler."""
server_class = TestUDPServer
address = ('localhost', 0)
if threading:
server_class = TestUDPServer
address = ('localhost', 0)
def setUp(self):
"""Set up a UDP server to receive log messages, and a DatagramHandler
...
...
@@ -1520,7 +1522,8 @@ class UnixDatagramHandlerTest(DatagramHandlerTest):
"""Test for DatagramHandler using Unix sockets."""
server_class = TestUnixDatagramServer
if threading:
server_class = TestUnixDatagramServer
def setUp(self):
# override the definition in the base class
...
...
@@ -1536,8 +1539,9 @@ class SysLogHandlerTest(BaseTest):
"""Test for SysLogHandler using UDP."""
server_class = TestUDPServer
address = ('localhost', 0)
if threading:
server_class = TestUDPServer
address = ('localhost', 0)
def setUp(self):
"""Set up a UDP server to receive log messages, and a SysLogHandler
...
...
@@ -1593,7 +1597,8 @@ class UnixSysLogHandlerTest(SysLogHandlerTest):
"""Test for SysLogHandler with Unix sockets."""
server_class = TestUnixDatagramServer
if threading:
server_class = TestUnixDatagramServer
def setUp(self):
# override the definition in the base class
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment