TST: fixed StringIO for python3