python / python/cpython

``test_os.test_attributes()`` fails on Windows

Aperta
#126,253 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

OS-windows tests type-bug
Lingua principale
Python
Stelle
77.2k
Fork
35.9k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

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.

Direzione di ricerca

Esegui ./python -m test -v test_os su Windows e leggi Lib/test/test_os.py nelle vicinanze di test_attributes, check_entry e assert_stat_equal. Confronta il fallimento con la PR collegata gh-156305; il lavoro è completato quando test_os passa su Windows senza la discrepanza st_file_attributes segnalata.

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

Valutazione

Stack tecnologico
python
Ambito
operating-systems, testing-qa
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.