mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
More test_logging coverage improvements.
This commit is contained in:
parent
26fe4b70cf
commit
985ef87ea0
4 changed files with 57 additions and 14 deletions
|
@ -30,7 +30,7 @@ import types, io
|
|||
try:
|
||||
import _thread as thread
|
||||
import threading
|
||||
except ImportError:
|
||||
except ImportError: #pragma: no cover
|
||||
thread = None
|
||||
|
||||
from socketserver import ThreadingTCPServer, StreamRequestHandler
|
||||
|
@ -786,7 +786,7 @@ def listen(port=DEFAULT_LOGGING_CONFIG_PORT):
|
|||
and which you can join() when appropriate. To stop the server, call
|
||||
stopListening().
|
||||
"""
|
||||
if not thread:
|
||||
if not thread: #pragma: no cover
|
||||
raise NotImplementedError("listen() needs threading to work")
|
||||
|
||||
class ConfigStreamHandler(StreamRequestHandler):
|
||||
|
@ -825,7 +825,7 @@ def listen(port=DEFAULT_LOGGING_CONFIG_PORT):
|
|||
file = io.StringIO(chunk)
|
||||
try:
|
||||
fileConfig(file)
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
except (KeyboardInterrupt, SystemExit): #pragma: no cover
|
||||
raise
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue