mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.12] gh-116600: [Enum] fix global Flag repr (GH-116615) (GH-116629)
* and fix global flag repr
(cherry picked from commit 06e29a224f
)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
This commit is contained in:
parent
8b3b5be934
commit
1fb661579d
3 changed files with 4 additions and 1 deletions
|
@ -3959,6 +3959,8 @@ class OldTestIntFlag(unittest.TestCase):
|
|||
)
|
||||
|
||||
def test_global_enum_str(self):
|
||||
self.assertEqual(repr(NoName.ONE), 'test_enum.ONE')
|
||||
self.assertEqual(repr(NoName(0)), 'test_enum.NoName(0)')
|
||||
self.assertEqual(str(NoName.ONE & NoName.TWO), 'NoName(0)')
|
||||
self.assertEqual(str(NoName(0)), 'NoName(0)')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue