def read(self, size: int | None = None) -> bytes:
            """Return one byte at a time regardless of requested size."""

            if size is None or size == -1:
                raise ValueError("expected read to be called with specific limit")

            if size == 0 or len(self.buf) < self.pos:
                return b""

            b = self.buf[self.pos : self.pos + 1]
            self.pos += 1
            return b
Return one byte at a time regardless of requested size.
tests/test_wsgi.py