python / python/cpython

test_idle test_configdialog.HighPageTest failing on macOS

Open
#134,770 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OS-mac topic-IDLE type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Bug report

Saw these failure on a normal macOS 13 runner:

======================================================================
ERROR: test_set_theme_type (idlelib.idle_test.test_configdialog.HighPageTest.test_set_theme_type)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/work/cpython/cpython/Lib/idlelib/idle_test/test_configdialog.py", line 295, in setUp
    d.set_highlight_target.called = 0
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'method' object has no attribute 'called' and no __dict__ for setting new attributes

======================================================================
ERROR: test_theme_source (idlelib.idle_test.test_configdialog.HighPageTest.test_theme_source)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/work/cpython/cpython/Lib/idlelib/idle_test/test_configdialog.py", line 295, in setUp
    d.set_highlight_target.called = 0
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'method' object has no attribute 'called' and no __dict__ for setting new attributes

======================================================================
ERROR: tearDownClass (idlelib.idle_test.test_configdialog.HighPageTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/work/cpython/cpython/Lib/idlelib/idle_test/test_configdialog.py", line 284, in tearDownClass
    del d.set_highlight_target, d.set_color_sample
        ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'HighPage' object has no attribute 'set_highlight_target'. Did you mean: 'highlight_target'?

======================================================================
FAIL: test_delete_custom (idlelib.idle_test.test_configdialog.HighPageTest.test_delete_custom)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/work/cpython/cpython/Lib/idlelib/idle_test/test_configdialog.py", line 748, in test_delete_custom
    eq(d.custom_theme_on.state(), ())
    ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: ('background',) != ()

First tuple contains 1 additional elements.
First extra element 0:
'background'

- ('background',)
+ ()

<snip>

Example failed run:
https://github.com/python/cpython/actions/runs/15265517831/job/42930405567

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Lib/idlelib/idle_test/test_configdialog.py, especially HighPageTest.setUp, tearDownClass, test_set_theme_type, test_theme_source, and test_delete_custom. Reproduce the reported failures on macOS and inspect the corresponding HighPage behavior; done means these tests complete without the method-attribute and unexpected-state errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.