Unit testing is good, but the actual behaviour of a program also should be tested.
I wanted not to re-invent the wheel, and looked for an existing tool. My first query to Google was "testing command line". Reiewing the results, I found DejaGnu and realized that what I need is called "functional testing".
Then I looked at DMOZ and also found several matches. I gave up using Google and DMOZ after I found the great resource:
My favourites are DejaGnu and STAF.
Unfortunately, STAF is overkill for me.
Unfortunately, DejaGnu is Expect/Tcl.
Unfortunately, I haven't found a python solution.
It seems I'm going to develop my own trivial functional testing script. All is as usual.