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

test: Add fixture for testing the y/n prompt #3452

Open
jjerphan opened this issue Sep 17, 2024 · 2 comments
Open

test: Add fixture for testing the y/n prompt #3452

jjerphan opened this issue Sep 17, 2024 · 2 comments

Comments

@jjerphan
Copy link
Member

Currently only the y case and dry-run can be tested with --yes and --dry-run respectively.

There's no way to test the n case as briefly discussed in #3450.

We must be able to test all interactive cases of the CLI.

@jjerphan
Copy link
Member Author

This can be implemented by introducing always_no similarly to the already existing always_yes which could be triggered via a --no flag, in which case one would need to prevent its interactions with --no.

@jjerphan
Copy link
Member Author

An alternative is to prepend echo n | to the command executed by the sub-process via the python helpers.

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