Maybe pexpect does what you want? https://pypi.org/project/pexpect/

We recently started using it to test make targets in the Open edX development environment, those tests are at https://github.com/edx/devstack/tree/master/tests if they're useful for reference.

Jeremy Bowman


On 2021-06-10 13:43, Dan Stromberg wrote:

 
Hi folks.
 
Are there any tools available for system testing a large, shell-callable python script with many different command line options?
 
I'm aware of pytest for unit tests, but what about running a shell command with some options, and checking its stdout for appropriate content?
 
Thanks.
 
--
Dan Stromberg

_______________________________________________
code-quality mailing list -- code-quality@python.org
To unsubscribe send an email to code-quality-leave@python.org
https://mail.python.org/mailman3/lists/code-quality.python.org/
Member address: code-quality@portabase.org