diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-03-05 12:45:51 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-03-05 12:45:51 (GMT) |
commit | 8d217c6a7103b51cfbe85b2b4ad509cb6ebeb95b (patch) | |
tree | 6fbe9009a7185422aa1b8c3e6c3b949534217187 /Lib/test/test_logging.py | |
parent | 8cf4b51fa4954393450f02cb38a5e60847eab8e5 (diff) | |
download | cpython-8d217c6a7103b51cfbe85b2b4ad509cb6ebeb95b.zip cpython-8d217c6a7103b51cfbe85b2b4ad509cb6ebeb95b.tar.gz cpython-8d217c6a7103b51cfbe85b2b4ad509cb6ebeb95b.tar.bz2 |
Issue #12151: Added more info to diagnostics.
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r-- | Lib/test/test_logging.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index b490b6e..1aa0bdb 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -3653,11 +3653,12 @@ class TimedRotatingFileHandlerTest(BaseFileTest): 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 |