]> granicus.if.org Git - python/commitdiff
Added delay before record creation.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Mon, 5 Mar 2012 20:02:53 +0000 (20:02 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Mon, 5 Mar 2012 20:02:53 +0000 (20:02 +0000)
Lib/test/test_logging.py

index 1aa0bdb62642c1eaec7efac0cb23bdb6bccf9d91..98a28193b47aaa7ffb0d8570064c9070bd366411 100644 (file)
@@ -3654,10 +3654,10 @@ class TimedRotatingFileHandlerTest(BaseFileTest):
         fmt = logging.Formatter('%(asctime)s %(message)s')
         fh.setFormatter(fmt)
         r1 = logging.makeLogRecord({'msg': 'testing - initial'})
-        r2 = logging.makeLogRecord({'msg': 'testing - after delay'})
         fh.emit(r1)
         self.assertLogFile(self.fn)
         time.sleep(1.1)    # a little over a second ...
+        r2 = logging.makeLogRecord({'msg': 'testing - after delay'})
         fh.emit(r2)
         fh.close()
         # At this point, we should have a recent rotated file which we