test_ttk: NotebookTest.test_traversal() fails randomly on Windows

オープン
#161,634 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
54/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
testing

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
Python
スター
78.2k
フォーク
36.6k
平均マージ
19時間 57分
マージ済み PR(30日)
630

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

python/cpython のほかの issue

python/cpython の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。