I was testing a program that took N lines of input, manipulated them somehow and returned M lines of output. To test it properly I wanted to test both the internal interface and the external interface.
The main function looked something like this:
import sys