mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Issue #12151: Added more info to diagnostics.
This commit is contained in:
		
							parent
							
								
									8cf4b51fa4
								
							
						
					
					
						commit
						8d217c6a71
					
				
					 1 changed files with 5 additions and 4 deletions
				
			
		|  | @ -3653,11 +3653,12 @@ def test_rollover(self): | ||||||
|                                                        backupCount=1) |                                                        backupCount=1) | ||||||
|         fmt = logging.Formatter('%(asctime)s %(message)s') |         fmt = logging.Formatter('%(asctime)s %(message)s') | ||||||
|         fh.setFormatter(fmt) |         fh.setFormatter(fmt) | ||||||
|         r = logging.makeLogRecord({'msg': 'testing'}) |         r1 = logging.makeLogRecord({'msg': 'testing - initial'}) | ||||||
|         fh.emit(r) |         r2 = logging.makeLogRecord({'msg': 'testing - after delay'}) | ||||||
|  |         fh.emit(r1) | ||||||
|         self.assertLogFile(self.fn) |         self.assertLogFile(self.fn) | ||||||
|         time.sleep(1.01)    # just a little over a second ... |         time.sleep(1.1)    # a little over a second ... | ||||||
|         fh.emit(r) |         fh.emit(r2) | ||||||
|         fh.close() |         fh.close() | ||||||
|         # At this point, we should have a recent rotated file which we |         # At this point, we should have a recent rotated file which we | ||||||
|         # can test for the existence of. However, in practice, on some |         # can test for the existence of. However, in practice, on some | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vinay Sajip
						Vinay Sajip