summaryrefslogtreecommitdiff
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-03-05 12:45:51 +0000
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-03-05 12:45:51 +0000
commit8b8f0e2e652bc92b6b1e4bda22ffae663a14f579 (patch)
tree06a5f5602d61534968a7ad735f99e315584105ba /Lib/test/test_logging.py
parentec94a9087be0bcdabbc48e5295a89ca4f65cad5f (diff)
downloadcpython-8b8f0e2e652bc92b6b1e4bda22ffae663a14f579.tar.gz
Issue #12151: Added more info to diagnostics.
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index b490b6e510..1aa0bdb626 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