* Fix fileobj I/O undeterministic behavior Ever since the file-like object support was added in #1158, the test was occasionally failing in CI. This PR fixes this.