Skip to content

Commit a71b117

Browse files
authored
[Enum] add built-in property to test_test_simple_enum (GH-98453)
1 parent 8463cb5 commit a71b117

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Lib/test/test_enum.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4376,10 +4376,16 @@ class SimpleColor:
43764376
CYAN = 1
43774377
MAGENTA = 2
43784378
YELLOW = 3
4379+
@bltns.property
4380+
def zeroth(self):
4381+
return 'zeroed %s' % self.name
43794382
class CheckedColor(Enum):
43804383
CYAN = 1
43814384
MAGENTA = 2
43824385
YELLOW = 3
4386+
@bltns.property
4387+
def zeroth(self):
4388+
return 'zeroed %s' % self.name
43834389
self.assertTrue(_test_simple_enum(CheckedColor, SimpleColor) is None)
43844390
SimpleColor.MAGENTA._value_ = 9
43854391
self.assertRaisesRegex(

0 commit comments

Comments
 (0)