mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	(merge 3.2) Issue #12400: runtest() truncates the StringIO stream before a new
test
This commit is contained in:
		
						commit
						fa832dea2a
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -847,6 +847,7 @@ def runtest(test, verbose, quiet,
 | 
				
			||||||
            if runtest.stringio is None:
 | 
					            if runtest.stringio is None:
 | 
				
			||||||
                runtest.stringio = io.StringIO()
 | 
					                runtest.stringio = io.StringIO()
 | 
				
			||||||
            stream = runtest.stringio
 | 
					            stream = runtest.stringio
 | 
				
			||||||
 | 
					            stream.truncate(0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            orig_stdout = sys.stdout
 | 
					            orig_stdout = sys.stdout
 | 
				
			||||||
            orig_stderr = sys.stderr
 | 
					            orig_stderr = sys.stderr
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue