mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.11] [Enum] fix check in _test_simple_enum (GH-96435)
The builtin `property` is not a callable, so was failing the check in `_test_simple_enum` causing a match failure; this adds `property` to the bypass list. Co-authored-by: Alexandru Mărășteanu <alexei@users.noreply.github.com>
This commit is contained in:
parent
d00a9e0176
commit
8f58db2279
2 changed files with 7 additions and 1 deletions
|
@ -4337,10 +4337,16 @@ class TestStdLib(unittest.TestCase):
|
|||
CYAN = 1
|
||||
MAGENTA = 2
|
||||
YELLOW = 3
|
||||
@bltns.property
|
||||
def zeroth(self):
|
||||
return 'zeroed %s' % self.name
|
||||
class CheckedColor(Enum):
|
||||
CYAN = 1
|
||||
MAGENTA = 2
|
||||
YELLOW = 3
|
||||
@bltns.property
|
||||
def zeroth(self):
|
||||
return 'zeroed %s' % self.name
|
||||
self.assertTrue(_test_simple_enum(CheckedColor, SimpleColor) is None)
|
||||
SimpleColor.MAGENTA._value_ = 9
|
||||
self.assertRaisesRegex(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue