mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	bpo-40723: Make IDLE autocomplete test run without __main__.__file__ (GH-20311)
This was the only failure running unittest.main(test.test_idle) after imports.
(cherry picked from commit 905b3cd05f)
Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
			
			
This commit is contained in:
		
							parent
							
								
									a3c3e8920a
								
							
						
					
					
						commit
						874506cff9
					
				
					 3 changed files with 4 additions and 1 deletions
				
			
		|  | @ -227,7 +227,7 @@ def test_fetch_completions(self): | |||
|         acp = self.autocomplete | ||||
|         small, large = acp.fetch_completions( | ||||
|                 '', ac.ATTRS) | ||||
|         if __main__.__file__ != ac.__file__: | ||||
|         if hasattr(__main__, '__file__') and __main__.__file__ != ac.__file__: | ||||
|             self.assertNotIn('AutoComplete', small)  # See issue 36405. | ||||
| 
 | ||||
|         # Test attributes | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Miss Islington (bot)
						Miss Islington (bot)