StringIO is, apparently, not a context manager