Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_logging.py @ 75419:a495c41c1e13
Issue #12151: Added more info to diagnostics.
| author | Vinay Sajip <vinay_sajip@yahoo.co.uk> |
|---|---|
| date | Mon, 05 Mar 2012 12:45:51 +0000 |
| parents | 0457fb8bf39c |
| children | 09f19e575724 |
line wrap: on
line diff
--- a/Lib/test/test_logging.py Mon Mar 05 12:37:02 2012 +0100 +++ b/Lib/test/test_logging.py Mon Mar 05 12:45:51 2012 +0000 @@ -3653,11 +3653,12 @@ backupCount=1) fmt = logging.Formatter('%(asctime)s %(message)s') fh.setFormatter(fmt) - r = logging.makeLogRecord({'msg': 'testing'}) - fh.emit(r) + r1 = logging.makeLogRecord({'msg': 'testing - initial'}) + r2 = logging.makeLogRecord({'msg': 'testing - after delay'}) + fh.emit(r1) self.assertLogFile(self.fn) - time.sleep(1.01) # just a little over a second ... - fh.emit(r) + time.sleep(1.1) # a little over a second ... + fh.emit(r2) fh.close() # At this point, we should have a recent rotated file which we # can test for the existence of. However, in practice, on some
