Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

test_watch_multiple_dirs fails consistently

Aperta
#200 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
testing

Direzione di ricerca

Start with tests/test_watcher.py, especially test_watch_multiple_dirs at line 147, and run that test under the reported Python 2.7 and 3.7 environments. Trace why watcher.examine() does not return (first_path, None); done means the multiple-directory watcher test passes consistently on both versions.

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

Descrizione

Hello,

While trying to package v2.6.1 for NixOS (see https://github.com/NixOS/nixpkgs/pull/61905) I noticed that the latest addition to your test suite test_watch_multiple_dirs kept failing for both Python 2.7 and Python 3.7 builds.

The nosetests trace with debug is:

nose.suite: DEBUG: precache is [Test(<tests.test_watcher.TestWatcher testMethod=test_watch_dir>), Test(<tests.test_watcher.TestWatcher testMethod=test_watch_file>), Test(<tests.test_watcher.TestWatcher testMethod=test_watch_glob>), Test(<tests.test_watcher.TestWatcher testMethod=test_watch_ignore>), Test(<tests.test_watcher.TestWatcher testMethod=test_watch_multiple_dirs>)]
test_watch_dir (tests.test_watcher.TestWatcher) ... ok
test_watch_file (tests.test_watcher.TestWatcher) ... ok
test_watch_glob (tests.test_watcher.TestWatcher) ... ok
test_watch_ignore (tests.test_watcher.TestWatcher) ... ok
test_watch_multiple_dirs (tests.test_watcher.TestWatcher) ... FAIL
nose.suite: DEBUG: context teardown
nose.suite: DEBUG: ancestor <class 'tests.test_watcher.TestWatcher'> may need teardown
nose.suite: DEBUG: <nose.suite.ContextSuite context=TestWatcher> setup ancestor <class 'tests.test_watcher.TestWatcher'>
nose.suite: DEBUG: <nose.suite.ContextSuite context=TestWatcher> teardown context <class 'tests.test_watcher.TestWatcher'>
nose: DEBUG: call fixture <class 'tests.test_watcher.TestWatcher'>.tearDownClass
nose.suite: DEBUG: ancestor <module 'tests.test_watcher' from '/build/source/tests/test_watcher.py'> may need teardown
nose.suite: DEBUG: <nose.suite.ContextSuite context=tests.test_watcher> setup ancestor <module 'tests.test_watcher' from '/build/source/tests/test_watcher.py'>
nose.suite: DEBUG: ancestor <module 'tests' from '/build/source/tests/__init__.py'> may need teardown
nose.suite: DEBUG: <nose.suite.ContextSuite context=tests> setup ancestor <module 'tests' from '/build/source/tests/__init__.py'>
nose.suite: DEBUG: ancestor <class 'tests.test_watcher.TestWatcher'> may need teardown
nose.suite: DEBUG: ancestor <class 'tests.test_watcher.TestWatcher'> already torn down
nose.suite: DEBUG: context teardown
nose.suite: DEBUG: ancestor <module 'tests.test_watcher' from '/build/source/tests/test_watcher.py'> may need teardown
nose.suite: DEBUG: <nose.suite.ContextSuite context=tests.test_watcher> setup ancestor <module 'tests.test_watcher' from '/build/source/tests/test_watcher.py'>
nose.suite: DEBUG: <nose.suite.ContextSuite context=tests.test_watcher> teardown context <module 'tests.test_watcher' from '/build/source/tests/test_watcher.py'>
nose.suite: DEBUG: ancestor <module 'tests' from '/build/source/tests/__init__.py'> may need teardown
nose.suite: DEBUG: <nose.suite.ContextSuite context=tests> setup ancestor <module 'tests' from '/build/source/tests/__init__.py'>
nose.suite: DEBUG: ancestor <module 'tests.test_watcher' from '/build/source/tests/test_watcher.py'> may need teardown
nose.suite: DEBUG: ancestor <module 'tests.test_watcher' from '/build/source/tests/test_watcher.py'> already torn down
nose.suite: DEBUG: context teardown
nose.suite: DEBUG: ancestor <module 'tests' from '/build/source/tests/__init__.py'> may need teardown
nose.suite: DEBUG: <nose.suite.ContextSuite context=tests> setup ancestor <module 'tests' from '/build/source/tests/__init__.py'>
nose.suite: DEBUG: <nose.suite.ContextSuite context=tests> teardown context <module 'tests' from '/build/source/tests/__init__.py'>
nose.suite: DEBUG: ancestor <module 'tests' from '/build/source/tests/__init__.py'> may need teardown
nose.suite: DEBUG: ancestor <module 'tests' from '/build/source/tests/__init__.py'> already torn down
nose.suite: DEBUG: context teardown
nose.suite: DEBUG: No reason to teardown (was_setup? False was_torndown? False)

======================================================================
FAIL: test_watch_multiple_dirs (tests.test_watcher.TestWatcher)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/source/tests/test_watcher.py", line 147, in test_watch_multiple_dirs
    assert watcher.examine() == (first_path, None)
AssertionError

----------------------------------------------------------------------
Ran 5 tests in 3.099s

FAILED (failures=1)

I can't really figure out why it fails.

Lingua principale
Python
Stelle
1.1k
Fork
149
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 lepture/python-livereload

Tutte le issue di lepture/python-livereload

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.