From a71b117c3d4e4828057970706d03c2dad8f67c1f Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Sun, 6 Nov 2022 12:03:42 -0800 Subject: [PATCH] [Enum] add built-in property to test_test_simple_enum (GH-98453) --- Lib/test/test_enum.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index 38b1d7c7714..03a9c610a86 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -4376,10 +4376,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(