-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
» ./python.exe -OO -m test test_enum
Using random seed: 918426150
0:00:00 load avg: 2.87 Run 1 test sequentially
0:00:00 load avg: 2.87 [1/1] test_enum
test test_enum failed -- Traceback (most recent call last):
File "/Users/sobolev/Desktop/cpython2/Lib/test/test_enum.py", line 4931, in test_pydoc
self.assertEqual(result, expected_text, result)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Help[234 chars]n | CYAN = <Color.CYAN: 1>\n |\n | MAGENTA =[658 chars]rs__' != 'Help[234 chars]n | YELLOW = <Color.YELLOW: 3>\n |\n | MAGEN[361 chars]rs__'
Help on class Color in module test.test_enum:
class Color(enum.Enum)
| Color(*values)
|
| Method resolution order:
| Color
| enum.Enum
| builtins.object
|
| Data and other attributes defined here:
|
- | CYAN = <Color.CYAN: 1>
+ | YELLOW = <Color.YELLOW: 3>
|
| MAGENTA = <Color.MAGENTA: 2>
|
- | YELLOW = <Color.YELLOW: 3>
+ | CYAN = <Color.CYAN: 1>
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
|
| value
|
| ----------------------------------------------------------------------
- | Methods inherited from enum.EnumType:
? ^ - ^
+ | Data descriptors inherited from enum.EnumType:
? ^^^^^^ +++++ ^
- |
- | __contains__(value) from enum.EnumType
- |
- | __getitem__(name) from enum.EnumType
- |
- | __iter__() from enum.EnumType
- |
- | __len__() from enum.EnumType
- |
- | ----------------------------------------------------------------------
- | Readonly properties inherited from enum.EnumType:
|
| __members__
: Help on class Color in module test.test_enum:
class Color(enum.Enum)
| Color(*values)
|
| Method resolution order:
| Color
| enum.Enum
| builtins.object
|
| Data and other attributes defined here:
|
| CYAN = <Color.CYAN: 1>
|
| MAGENTA = <Color.MAGENTA: 2>
|
| YELLOW = <Color.YELLOW: 3>
|
| ----------------------------------------------------------------------
| Data descriptors inherited from enum.Enum:
|
| name
|
| value
|
| ----------------------------------------------------------------------
| Methods inherited from enum.EnumType:
|
| __contains__(value) from enum.EnumType
|
| __getitem__(name) from enum.EnumType
|
| __iter__() from enum.EnumType
|
| __len__() from enum.EnumType
|
| ----------------------------------------------------------------------
| Readonly properties inherited from enum.EnumType:
|
| __members__
test_enum failed (1 failure)
== Tests result: FAILURE ==
1 test failed:
test_enum
Total duration: 831 ms
Total tests: run=1,068 failures=1 skipped=4
Total test files: run=1/1 failed=1
Result: FAILURE
I have a PR ready.
Linked PRs
- gh-115252: Fix
test_enum
with-OO
mode #115253 - [3.12] gh-115252: Fix
test_enum
with-OO
mode (GH-115253) #115260 - [3.11] gh-115252: Fix
test_enum
with-OO
mode (GH-115253) #115279 - gh-115252: Fix test_enum with -OO mode again #115334
- [3.12] gh-115252: Fix test_enum with -OO mode again (GH-115334) #115396
- [3.11] gh-115252: Fix test_enum with -OO mode again (GH-115334) #115397
BilakshanP
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error