Tests failing
还没有人认领这个 Issue。
评估
调研方向
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
- 派生
- 149
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
lepture/python-livereload 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 70/100
lepture/python-livereload#159 · 3 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
lepture/python-livereload#288 ·
-
难度 3/5 1-2 天 新手友好度 38/100
lepture/python-livereload#283 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
lepture/python-livereload#282 ·
-
难度 4/5 3-5 天 新手友好度 25/100
lepture/python-livereload#279 ·
查看 lepture/python-livereload 的全部 Issue
相似的 Issue
-
🐛 Bug: Calendar work items cannot be opened on mobile可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1 小时以内 新手友好度 75/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
Status: Triage Type: Bug
难度 2/5 1-3 小时 新手友好度 86/100
-
Objects.List treats versions=false (and similar flags) as true可能已有人在做 @andaaron 今天认领。 未关闭priority: p2 type: bug
难度 2/5 1-3 小时 新手友好度 78/100
googleapis/storage-testbench#829 ·
维护者通常 2 天内回复
-
[Bug]: memory provider treats 1:1 DMs as shared surfaces, so DM turns never receive reviewed records未关闭
难度 2/5 1-3 小时 新手友好度 79/100
rlaope/oh-my-hermes#2088 ·
维护者通常 1 天内回复