Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perfect mocking mechanism #591

Open
tony opened this issue Mar 2, 2025 · 0 comments
Open

Perfect mocking mechanism #591

tony opened this issue Mar 2, 2025 · 0 comments

Comments

@tony
Copy link
Member

tony commented Mar 2, 2025

Problem

Waiter (test_waiter) flakes a lot.

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:

  1. Existing fuzziness cause by environments, different shells
  2. Shell updates, OS updates
  3. Tmux updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant