| 1556 | """A zone can be read from an object that only has a read() method.""" |
| 1557 | |
| 1558 | class ReadOnly: |
| 1559 | def __init__(self, data): |
| 1560 | self._stream = io.BytesIO(data) |
| 1561 | |
| 1562 | def read(self, *args): |
| 1563 | return self._stream.read(*args) |
| 1564 | |
| 1565 | data = _zone_for_stream_tests() |
| 1566 | zone = tz.tzfile(ReadOnly(data), filename="read-only") |
no outgoing calls