Perfect mocking mechanism
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- cli, testing-qa
Hướng nghiên cứu
Start by reading test_waiter.py and the existing subprocess mocking around Waiter, then review the linked flakiness issues for the real failure cases. Define a low-level mock for shell responses that models real tmux use cases while preserving existing real-tmux tests; done should include deterministic tests for Waiter behavior and a clear approach to optional real-session tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Waiter (test_waiter) flakes a lot.
- #373
- #582
- #583
- #584
Proposal
For cases like Waiter, may we need an object to simulate shell responses perfectly for the sake of testing correct behavior of test_waiter.py
We're testing the correct behavior of Waiter
In this case, we want to be sure that in various instances, including simulated ones that are exact to real tmux use cases, waiter behaves as designed.
We want correct mocks
Examine mocking of subprocess responses. In the same way responses mocks requests, this would "tap in" at a low level, while also ensuring our existing tests using real tmux still work without any additional effort.
Maybe also permit real tests
Perhaps also allow e2e tests that use real tmux sessions in the backend too
We don't want to lose benefit of testing against real world scenarios:
- Existing fuzziness cause by environments, different shells
- Shell updates, OS updates
- Tmux updates
- Ngôn ngữ chính
- Python
- Star
- 1.2k
- Fork
- 127
- Merge trung bình
- 2 giờ 13 phút
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
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 tmux-python/libtmux
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
tmux-python/libtmux#759 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tmux-python/libtmux#745 · 2 bình luận ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
tmux-python/libtmux#744 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
tmux-python/libtmux#731 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tmux-python/libtmux#654 ·
Tất cả issue của tmux-python/libtmux
Issue tương tự
-
triage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
apache/cloudstack#14222 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100