test_ttk: NotebookTest.test_traversal() fails randomly on Windows

Aperta
#161,634 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
54/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
testing

Direzione di ricerca

Start with Lib/test/test_ttk/test_widgets.py, especially NotebookTest.test_traversal() around line 1297, and reproduce the failure on Windows using the reported test command or CI job. Trace how the notebook selection changes during traversal to understand why it sometimes remains . +label instead of selecting . +label2. Done means the test passes reliably on Windows and still checks the expected traversal behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

tests topic-tkinter

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
Lingua principale
Python
Stelle
78.2k
Fork
36.6k
Merge medio
19h 57m
PR unite (30g)
630

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python/cpython

Tutte le issue di python/cpython

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.