Perfect mocking mechanism
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- cli, testing-qa
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 127
- Avg merge
- 2h 13m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tmux-python/libtmux
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
tmux-python/libtmux#759 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
tmux-python/libtmux#745 · 2 comments ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
tmux-python/libtmux#744 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tmux-python/libtmux#731 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
tmux-python/libtmux#654 ·
All issues in tmux-python/libtmux
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100