Test passes under Python 3.
So, you have to close the Popen pipes, appearantly. There should be a context manager for that, I think.