Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

test_watch_multiple_dirs fails consistently

未关闭
#200 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
python
领域
testing

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Python
星标
1.1k
派生
149
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

lepture/python-livereload 的其他 Issue

查看 lepture/python-livereload 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。