Skip to content

test_ttk: NotebookTest.test_traversal() fails randomly on Windows #161634

Duplicate

Description

@vstinner

Windows / Build and test (x64, tail-call): https://github.com/python/cpython/actions/runs/42506853637/job/128811450926?pr=161626

Example:

0:06:31 load avg: 3.87 mem:   64.3 MiB [1/2/1] test_ttk failed (1 failure)
Re-running test_ttk in verbose mode (matching: test_traversal)
test_traversal (test.test_ttk.test_widgets.NotebookTest.test_traversal) ... FAIL

======================================================================
FAIL: test_traversal (test.test_ttk.test_widgets.NotebookTest.test_traversal)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\cpython\cpython\Lib\test\test_ttk\test_widgets.py", line 1297, in test_traversal
    self.assertEqual(self.nb.select(), str(self.child2))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '.+label' != '.+label2'
- .+label
+ .+label2
?        +


Error: AssertionError: '.+label' != '.+label2'
- .+label
+ .+label2
?        +
----------------------------------------------------------------------
Ran 1 test in 0.174s

FAILED (failures=1)
test test_ttk failed

Activity

  1. added
    tests
    on Nov 8, 2026
  2. vstinner commented on Nov 8, 2026

    @vstinner
    MemberAuthor
  3. Nikhitha2027 commented on Nov 17, 2026

    @Nikhitha2027

    Hi! I'd like to help investigate and resolve this intermittent test failure. I'm interested in understanding why the notebook traversal behaves inconsistently on Windows and exploring a possible fix.

    Would it be okay for me to investigate this issue and submit a proposed solution? I'd appreciate any guidance on where to start.

    Thank you!

  4. vstinner commented on Nov 17, 2026

    @vstinner
    MemberAuthor

    Anyone is free to debug any Python issue. On this test failure, I have no clue why the test failed once on Windows.

  5. serhiy-storchaka commented on Nov 23, 2026

    @serhiy-storchaka
    Member

    Probably it was caused by a race with concurrent IDLE tests. #156082 is purposed to prevent such races.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    teststopic-tkinter

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions