Tests failing
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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 ==========================
- Ngôn ngữ chính
- Python
- Star
- 1.1k
- Fork
- 148
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của lepture/python-livereload
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
lepture/python-livereload#159 · 3 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
lepture/python-livereload#288 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
lepture/python-livereload#283 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
lepture/python-livereload#282 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
lepture/python-livereload#279 ·
Tất cả issue của lepture/python-livereload
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
pyjanitor-devs/pyjanitor#1758 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug ready for review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
odysseus-dev/odysseus#6641 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
happypawspillaro/happypaws#78 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
pydanty:is-working
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
pydantic/pydantic-ai#10020 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
stdlib type-bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
python/cpython#159044 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày