Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
Closed
Labels
Description
Bug report
Bug description:
https://buildbot.python.org/all/#/builders/1047/builds/1074
====================================================================== FAIL: /Doc/howto/enum.rst Doctest: enum.rst ---------------------------------------------------------------------- Traceback (most recent call last): File "/Lib/doctest.py", line 2239, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for enum.rst File "/Doc/howto/enum.rst", line 0 ---------------------------------------------------------------------- File "/Doc/howto/enum.rst", line 1395, in enum.rst Failed example: class Color(DuplicateFreeEnum): RED = 1 GREEN = 2 BLUE = 3 GRENE = 2 Expected: Traceback (most recent call last): ... ValueError: aliases not allowed in DuplicateFreeEnum: 'GRENE' --> 'GREEN' Error calling __set_name__ on '_proto_member' instance 'GRENE' in 'Color' Got: Traceback (most recent call last): File "/Lib/doctest.py", line 1351, in __run exec(compile(example.source, filename, "single", File "<doctest enum.rst[160]>", line 1, in <module> class Color(DuplicateFreeEnum): File "/Lib/enum.py", line 566, in __new__ raise exc File "/Lib/enum.py", line 275, in __set_name__ enum_member.__init__(*args) File "<doctest enum.rst[159]>", line 7, in __init__ raise ValueError( ValueError: aliases not allowed in DuplicateFreeEnum: 'GRENE' --> 'GREEN' ---------------------------------------------------------------------- CPython versions tested on:
3.11
Operating systems tested on:
Other