mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Get test_optparse to pass in -R mode by stop changing state (COLUMNS env var)
This commit is contained in:
		
							parent
							
								
									349c0ed27f
								
							
						
					
					
						commit
						aa34b6c2e3
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -1382,8 +1382,15 @@ def test_conflict_override_args(self): | |||
| 
 | ||||
| class TestHelp(BaseTest): | ||||
|     def setUp(self): | ||||
|         self.orig_columns = os.environ.get('COLUMNS') | ||||
|         self.parser = self.make_parser(80) | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         if self.orig_columns is None: | ||||
|             del os.environ['COLUMNS'] | ||||
|         else: | ||||
|             os.environ['COLUMNS'] = self.orig_columns | ||||
| 
 | ||||
|     def make_parser(self, columns): | ||||
|         options = [ | ||||
|             make_option("-a", type="string", dest='a', | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Neal Norwitz
						Neal Norwitz