Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Tests failing

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

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

評価

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

調査の方向性

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.

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

説明

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 ==========================
主要言語
Python
スター
1.1k
フォーク
148
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

lepture/python-livereload のほかの issue

lepture/python-livereload の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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