If you run this with nosetests system_call.py, ls will actually print. Can you suppress the output to stdout?