[TIP] Functional Test Runner for Command Line Tools?
holger at merlinux.eu
Tue Apr 14 00:29:13 PDT 2009
On Tue, Apr 14, 2009 at 16:15 +1200, Noah Gift wrote:
> In looking at http://pycheesecake.org/wiki/PythonTestingToolsTaxonomy
> I don't see something that automates writing functional tests for
> command line tools. Hopefully, I am wrong, but I am looking for
> something that will fully exercise a command line tool easily. How is
> everyone else testing their command line tools?
I am doing that a lot with py.test to test itself.
Here is the current pattern for its acceptance tests -
i.e. tests that relate to how the user sees things.
the test runner cares for passing in a "testdir" object
which provides helper methods for creating files, running
commands. Currently that "testdir" is a bit py.test specific
but i am happy to factor out commonly useful methods
and advertise/document things a bit if you push me
a bit by filing a ticket on the brand-new issue tracker
on bitbucket i want to play with :)
Metaprogramming, Python, Testing: http://tetamap.wordpress.com
Python, PyPy, pytest contracting: http://merlinux.eu
More information about the testing-in-python