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

How can I test a trogon sub-command within a typer app? #103

Open
anschweitzer opened this issue Jan 6, 2025 · 1 comment
Open

How can I test a trogon sub-command within a typer app? #103

anschweitzer opened this issue Jan 6, 2025 · 1 comment
Labels
question Further information is requested

Comments

@anschweitzer
Copy link

I have a typer app with a command that calls trogon, which is lovely. Recently it broke because I updated my dependencies incorrectly. I would like to be able to verify it can run without exception. Trogon runs forever until it gets user input. Is there a way to pass "ctrl+q" to trogon when trogon is invoked from a typer commands?

Thanks.

@daneah
Copy link
Collaborator

daneah commented Mar 6, 2025

Hey @anschweitzer thanks for the question. I think this ultimately ends up being more of a Textual question, because the thing you want to send the quit signal to is the Textual app that Trogon ultimately creates. I'm not sure I have an immediate answer for you; my understanding is that the Textual app will end up executing as a process distinct from your own application code, so I'm not sure there's a good way to do this without intercepting the spawned process.

@daneah daneah added the question Further information is requested label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants