fix: added workaround for tests with StringIO as streams