Remove Enum prefixes (#187)
Co-authored-by: nat <n@natn.me> Co-authored-by: Tim Schmidt <w4rum@users.noreply.github.com> Co-authored-by: Arun Babu Neelicattu <arun.neelicattu@gmail.com>
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							d9b7608980
						
					
				
				
					commit
					bd7de203e1
				
			| @@ -1,4 +1,5 @@ | ||||
| from tests.output_betterproto.enum import ( | ||||
|     ArithmeticOperator, | ||||
|     Choice, | ||||
|     Test, | ||||
| ) | ||||
| @@ -102,3 +103,12 @@ def test_enum_mapped_on_parse(): | ||||
|  | ||||
|     # bonus: defaults after empty init are also mapped | ||||
|     assert Test().choice.name == Choice.ZERO.name | ||||
|  | ||||
|  | ||||
| def test_renamed_enum_members(): | ||||
|     assert set(ArithmeticOperator.__members__) == { | ||||
|         "NONE", | ||||
|         "PLUS", | ||||
|         "MINUS", | ||||
|         "_0_PREFIXED", | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user