``test_os.test_attributes()`` fails on Windows
オープン
まだ誰も着手していません。
OS-windows
tests
type-bug
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- PR マージ指標
- PR 指標を取得中
説明
Bug report
Bug description:
./python -m test -v test_os
======================================================================
FAIL: test_attributes (test.test_os.TestScandir.test_attributes)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\eclips4\programming\cpython\Lib\test\test_os.py", line 5040, in test_attributes
self.check_entry(entry, 'dir', True, False, False)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\eclips4\programming\cpython\Lib\test\test_os.py", line 5008, in check_entry
self.assert_stat_equal(entry.stat(),
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
entry_stat,
^^^^^^^^^^^
os.name == 'nt' and not is_symlink)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\eclips4\programming\cpython\Lib\test\test_os.py", line 4967, in assert_stat_equal
self.assertEqual(getattr(stat1, attr),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
getattr(stat2, attr),
^^^^^^^^^^^^^^^^^^^^^
(stat1, stat2, attr))
^^^^^^^^^^^^^^^^^^^^^
AssertionError: 16 != 268435472 : (os.stat_result(st_mode=16895, st_ino=0, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size=0, st_atime=1730398311, st_mtime=1730398311, st_ctime=1730398311), os.stat_result(st_mode=16895, st_ino=5066549580979864, st_dev=2642700522657803134, st_nlink=1, st_uid=0, st_gid=0, st_size=0, st_atime=1730398311, st_mtime=1730398311, st_ctime=1730398311), 'st_file_attributes')
----------------------------------------------------------------------
Ran 367 tests in 16.254s
FAILED (failures=1, skipped=146)
test test_os failed
test_os failed (1 failure)
== Tests result: FAILURE ==
1 test failed:
test_os
Total duration: 21.1 sec
Total tests: run=367 failures=1 skipped=146
Total test files: run=1/1 failed=1
Result: FAILURE
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs
- gh-156305
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Windows で ./python -m test -v test_os を実行し、Lib/test/test_os.py の test_attributes、check_entry、assert_stat_equal 付近を読んでください。失敗をリンクされている PR gh-156305 と比較してください。test_os が Windows 上で報告された st_file_attributes の不一致なしにパスすれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- operating-systems, testing-qa
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100