Skip to content

Perfect mocking mechanism #591

Open
Open
@tony

Description

@tony

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions