test_ttk: NotebookTest.test_traversal() fails randomly on Windows

Aberta
#161,634 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
54/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
python
Domínio
testing

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
Python
Estrelas
78.2k
Forks
36.6k
Merge médio
19h 57min
PRs com merge (30d)
630

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de python/cpython

Todas as issues de python/cpython

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.