cpython: 8fe3022af4b3 (original) (raw)
Mercurial > cpython
changeset 87736:8fe3022af4b3
Added some diagnostics to help with #19690. [#19690]
Vinay Sajip <vinay_sajip@yahoo.co.uk> | |
---|---|
date | Tue, 03 Dec 2013 12:31:23 +0000 |
parents | bfd45dc46569 |
children | 97fb852c5c26 |
files | Lib/test/test_logging.py |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-)[+] [-] Lib/test/test_logging.py 13 |
line wrap: on
line diff
--- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -590,6 +590,7 @@ class HandlerTest(BaseTest): for _ in range(tries): try: os.unlink(fname)
self.deletion_time = time.time()[](#l1.7) except OSError:[](#l1.8) pass[](#l1.9) time.sleep(0.004 * random.randint(0, 4))[](#l1.10)
@@ -597,6 +598,9 @@ class HandlerTest(BaseTest): del_count = 500 log_count = 500
self.handle_time = None[](#l1.15)
self.deletion_time = None[](#l1.16)
+ for delay in (False, True): fd, fn = tempfile.mkstemp('.log', 'test_logging-3-') os.close(fd) @@ -610,7 +614,14 @@ class HandlerTest(BaseTest): for _ in range(log_count): time.sleep(0.005) r = logging.makeLogRecord({'msg': 'testing' })
h.handle(r)[](#l1.25)
try:[](#l1.26)
self.handle_time = time.time()[](#l1.27)
h.handle(r)[](#l1.28)
except Exception:[](#l1.29)
print('Deleted at %s, '[](#l1.30)
'opened at %s' % (self.deletion_time,[](#l1.31)
self.handle_time))[](#l1.32)
raise[](#l1.33) finally:[](#l1.34) remover.join()[](#l1.35) h.close()[](#l1.36)