On Oct 24, 2007, at 01:30 , Feng Tien wrote:

> How do I write an assertion so it tests if, say the last line  
> printed is
> equal to the expected? Lasts just say the program asks for 2 numbers,
> and outputs all the number from the lowest to the highest.

The easiest way to do it is to store off stdout and replace it with a  
StringIO and test against that. Replace stdout in teardown.