mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Revert "gh-93910: [Enum] restore member.member restriction while keeping performance boost (GH-94913)" (#94981)
This reverts commit 30f28ac296
.
This commit is contained in:
parent
eda2f90094
commit
be84daf52a
2 changed files with 1 additions and 14 deletions
|
@ -2611,6 +2611,7 @@ class TestSpecial(unittest.TestCase):
|
|||
self.assertEqual(Private._Private__corporal, 'Radar')
|
||||
self.assertEqual(Private._Private__major_, 'Hoolihan')
|
||||
|
||||
@unittest.skip("Accessing all values retained for performance reasons, see GH-93910")
|
||||
def test_exception_for_member_from_member_access(self):
|
||||
with self.assertRaisesRegex(AttributeError, "<enum .Di.> member has no attribute .NO."):
|
||||
class Di(Enum):
|
||||
|
@ -2618,12 +2619,6 @@ class TestSpecial(unittest.TestCase):
|
|||
NO = 0
|
||||
nope = Di.YES.NO
|
||||
|
||||
def test_no_exception_for_overridden_member_from_member_access(self):
|
||||
class Di(Enum):
|
||||
YES = 1
|
||||
NO = 0
|
||||
Di.YES.NO = Di.NO
|
||||
nope = Di.YES.NO
|
||||
|
||||
def test_dynamic_members_with_static_methods(self):
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue