mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Issue22506: merge from 3.4
This commit is contained in:
		
						commit
						987f3dd161
					
				
					 2 changed files with 18 additions and 1 deletions
				
			
		|  | @ -176,6 +176,18 @@ def wowser(self): | |||
|                 set(['__class__', '__doc__', '__module__', 'name', 'value', 'wowser']), | ||||
|                 ) | ||||
| 
 | ||||
|     def test_dir_on_sub_with_behavior_on_super(self): | ||||
|         # see issue22506 | ||||
|         class SuperEnum(Enum): | ||||
|             def invisible(self): | ||||
|                 return "did you see me?" | ||||
|         class SubEnum(SuperEnum): | ||||
|             sample = 5 | ||||
|         self.assertEqual( | ||||
|                 set(dir(SubEnum.sample)), | ||||
|                 set(['__class__', '__doc__', '__module__', 'name', 'value', 'invisible']), | ||||
|                 ) | ||||
| 
 | ||||
|     def test_enum_in_enum_out(self): | ||||
|         Season = self.Season | ||||
|         self.assertIs(Season(Season.WINTER), Season.WINTER) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ethan Furman
						Ethan Furman