mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	Issue #25220, libregrtest: Cleanup
No need to support.verbose in Regrtest.run_tests(), it's always set in runtest().
This commit is contained in:
		
							parent
							
								
									6f20a2e01f
								
							
						
					
					
						commit
						b40843546b
					
				
					 2 changed files with 9 additions and 9 deletions
				
			
		| 
						 | 
					@ -310,17 +310,16 @@ class Regrtest:
 | 
				
			||||||
                if module not in save_modules and module.startswith("test."):
 | 
					                if module not in save_modules and module.startswith("test."):
 | 
				
			||||||
                    support.unload(module)
 | 
					                    support.unload(module)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def run_tests(self):
 | 
					    def _test_forever(self, tests):
 | 
				
			||||||
        support.verbose = self.ns.verbose   # Tell tests to be moderately quiet
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if self.ns.forever:
 | 
					 | 
				
			||||||
            def test_forever(tests):
 | 
					 | 
				
			||||||
        while True:
 | 
					        while True:
 | 
				
			||||||
            for test in tests:
 | 
					            for test in tests:
 | 
				
			||||||
                yield test
 | 
					                yield test
 | 
				
			||||||
                if self.bad:
 | 
					                if self.bad:
 | 
				
			||||||
                    return
 | 
					                    return
 | 
				
			||||||
            self.tests = test_forever(list(self.selected))
 | 
					
 | 
				
			||||||
 | 
					    def run_tests(self):
 | 
				
			||||||
 | 
					        if self.ns.forever:
 | 
				
			||||||
 | 
					            self.tests = _test_forever(list(self.selected))
 | 
				
			||||||
            self.test_count = ''
 | 
					            self.test_count = ''
 | 
				
			||||||
            self.test_count_width = 3
 | 
					            self.test_count_width = 3
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -68,6 +68,7 @@ def run_tests_slave(slaveargs):
 | 
				
			||||||
    except BaseException as e:
 | 
					    except BaseException as e:
 | 
				
			||||||
        traceback.print_exc()
 | 
					        traceback.print_exc()
 | 
				
			||||||
        result = CHILD_ERROR, str(e)
 | 
					        result = CHILD_ERROR, str(e)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    print()   # Force a newline (just in case)
 | 
					    print()   # Force a newline (just in case)
 | 
				
			||||||
    print(json.dumps(result), flush=True)
 | 
					    print(json.dumps(result), flush=True)
 | 
				
			||||||
    sys.exit(0)
 | 
					    sys.exit(0)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue