GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `test_enum` fails when run with `-OO` · Issue #115252 · python/cpython

test_enum fails when run with -OO #115252

New issue
Copy link
New issue
Copy link
Closed
Closed
test_enum fails when run with -OO#115252
Copy link
Assignees
sobolevn
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@sobolevn
sobolevn
opened on Feb 10, 2024
Issue body actions

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
Reacted by Bilakshan Purohit

Activity

  1. sobolevn
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    testsTests in the Lib/test dirTests in the Lib/test dir
    on Feb 10, 2024
  2. sobolevn
    self-assigned this
    on Feb 10, 2024
  3. sobolevn
    added a commit that references this issue on Feb 10, 2024

    pythongh-115252: Fix `test_enum` with `-00` mode

    0f337e6
  4. ethanfurman
    added a commit that references this issue on Feb 10, 2024

    gh-115252: Fix `test_enum` with `-OO` mode (GH-115253)

    33f56b7
  5. ethanfurman
    changed the title [-]`test_enum` fails when run with `-00`[/-] [+]`test_enum` fails when run with `-OO`[/+] on Feb 10, 2024
  6. miss-islington
    added a commit that references this issue on Feb 10, 2024

    pythongh-115252: Fix `test_enum` with `-OO` mode (pythonGH-115253)

    c780fc8
  7. ethanfurman
    added a commit that references this issue on Feb 11, 2024

    [3.12] gh-115252: Fix `test_enum` with `-OO` mode (GH-115253) (GH-115260

    ada6629
  8. sobolevn
    added 2 commits that reference this issue on Feb 11, 2024

    [3.11] pythongh-115252: Fix `test_enum` with `-OO` mode (pythonGH-115253

    b02dbc0

    [3.11] gh-115252: Fix `test_enum` with `-OO` mode (GH-115253) (#115279)

    879d8c4
  9. serhiy-storchaka
    added 2 commits that reference this issue on Feb 12, 2024

    pythongh-115252: Fix test_enum with -OO mode again

    40a9575

    gh-115252: Fix test_enum with -OO mode again (GH-115334)

    ca3604a
  10. miss-islington
    added a commit that references this issue on Feb 13, 2024

    pythongh-115252: Fix test_enum with -OO mode again (pythonGH-115334)

    2052086
  11. serhiy-storchaka
    added 3 commits that reference this issue on Feb 13, 2024

    [3.11] pythongh-115252: Fix test_enum with -OO mode again (pythonGH-1…

    150f824

    [3.12] gh-115252: Fix test_enum with -OO mode again (GH-115334) (GH-1…

    79d1d6d

    [3.11] gh-115252: Fix test_enum with -OO mode again (GH-115334) (GH-1…

    7ba2d78
  12. fsc-eriker
    added 2 commits that reference this issue on Feb 14, 2024

    pythongh-115252: Fix `test_enum` with `-OO` mode (pythonGH-115253)

    1b11ee4

    pythongh-115252: Fix test_enum with -OO mode again (pythonGH-115334)

    01f40fc
  13. sobolevn
    closed this as completedon Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @sobolevn
    sobolevn

Labels

testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.