Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Tests failing

Abierto
#255 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
testing

Línea de trabajo

Start with tests/test_watcher.py::TestWatcher::test_watch_multiple_dirs and run the failing test in the reported Linux packaging environment. Inspect the Watcher behavior used by that test, especially after watching two directories and modifying first_path. Done means the test detects the modification and the full watcher test file passes.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Hey, when packaging this for Arch Linux I noticed this failing test, I am not sure what it is happening here. Does anyone have any pointers?

============================= test session starts ==============================
platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
rootdir: /build/python-livereload/src/python-livereload-2.6.3
collecting ... collected 5 items

tests/test_watcher.py::TestWatcher::test_watch_dir PASSED                [ 20%]
tests/test_watcher.py::TestWatcher::test_watch_file PASSED               [ 40%]
tests/test_watcher.py::TestWatcher::test_watch_glob PASSED               [ 60%]
tests/test_watcher.py::TestWatcher::test_watch_ignore PASSED             [ 80%]
tests/test_watcher.py::TestWatcher::test_watch_multiple_dirs FAILED      [100%]

=================================== FAILURES ===================================
_____________________ TestWatcher.test_watch_multiple_dirs _____________________

self = <tests.test_watcher.TestWatcher testMethod=test_watch_multiple_dirs>

    def test_watch_multiple_dirs(self):
        first_dir = os.path.join(tmpdir, 'first')
        second_dir = os.path.join(tmpdir, 'second')

        watcher = Watcher()

        os.mkdir(first_dir)
        watcher.watch(first_dir)
        assert watcher.examine() == (None, None)

        first_path = os.path.join(first_dir, 'foo')
        with open(first_path, 'w') as f:
            f.write('')
        assert watcher.examine() == (first_path, None)
        assert watcher.examine() == (None, None)

        os.mkdir(second_dir)
        watcher.watch(second_dir)
        assert watcher.examine() == (None, None)

        second_path = os.path.join(second_dir, 'bar')
        with open(second_path, 'w') as f:
            f.write('')
        assert watcher.examine() == (second_path, None)
        assert watcher.examine() == (None, None)

        with open(first_path, 'a') as f:
            f.write('foo')
>       assert watcher.examine() == (first_path, None)
E       AssertionError: assert (None, None) == ('/build/python-livereload/src/python-livereload-2.6.3/tests/tmp/first/foo',\n None)
E         At index 0 diff: None != '/build/python-livereload/src/python-livereload-2.6.3/tests/tmp/first/foo'
E         Full diff:
E           (
E         -  '/build/python-livereload/src/python-livereload-2.6.3/tests/tmp/first/foo',
E         +  None,
E            None,
E           )

tests/test_watcher.py:147: AssertionError
=========================== short test summary info ============================
FAILED tests/test_watcher.py::TestWatcher::test_watch_multiple_dirs - Asserti...
========================= 1 failed, 4 passed in 3.16s ==========================
Lenguaje dominante
Python
Estrellas
1.1k
Forks
148
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de lepture/python-livereload

Todos los issues de lepture/python-livereload

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.