From: Ethan Furman Date: Sun, 6 Nov 2022 20:03:42 +0000 (-0800) Subject: [Enum] add built-in property to test_test_simple_enum (GH-98453) X-Git-Tag: v3.12.0a2~104 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a71b117c3d4e4828057970706d03c2dad8f67c1f;p=thirdparty%2FPython%2Fcpython.git [Enum] add built-in property to test_test_simple_enum (GH-98453) --- diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index 38b1d7c77146..03a9c610a86d 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(