replace StringIO with BytesIO
move pytest args to pytest.ini