I've built a python command line application, which operates in two modes:
in an interactive mode, where it opens up an interactive shell using python CMDModule.
Example:
running
plcliin command line, opens up its interactive mode(cmd)> do_x
reads commands from an input file and executes them one-by-one.
Example:
running
plcli input_file.txtin command line, it executes commands line-by-line and outputs result to stdout.
How do I write unit and integration test for this cli app. I've explored pytest-console-scripts and script-test but they doesn't seem to be optimum or best practice.
Please suggest accepted/best practise libraries or usage to test python command line applications.
Note : I'm not using any python cli frameworks like clint or click