On 6/10/21 11:43 AM, 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
There are probably lots of approaches to this. The project I mainly
work on isn't using pytest because it predates it, we'll maybe convert
someday but since it's unpaid on my part I have other priorities. It has
extensive tests of getting the right results given various combinations
of CLI options. The unit tests (they actually do use unittest, so
converting those would be easy) live together with the code containing
the units, the system/integration/end-to-end/pick-your-name tests are in
a separate test directory, and the test runner can be told to choose one
set or the other, default both, but with unit tests first - I think the
normal scheme (and pytest has support for this) is to not run the
integration tests if the unit tests don't pass. Pytest has support for
this behavior with decorators ("markers"), the --ignore-path option, etc.
Hope this at least gives some food for thought, though it's hard to call
it an "answer".
_______________________________________________
code-quality mailing list -- code-quality@python.org
To unsubscribe send an email to code-quality-le...@python.org
https://mail.python.org/mailman3/lists/code-quality.python.org/
Member address: arch...@mail-archive.com