()
| 1921 | |
| 1922 | |
| 1923 | def test_input_stream_duck_typing(): |
| 1924 | # Accept objects having the right file-like methods... |
| 1925 | class DuckReader: |
| 1926 | |
| 1927 | def close(self): |
| 1928 | pass |
| 1929 | |
| 1930 | @property |
| 1931 | def closed(self): |
| 1932 | return False |
| 1933 | |
| 1934 | def read(self, nbytes=None): |
| 1935 | return b'hello' |
| 1936 | |
| 1937 | stream = pa.input_stream(DuckReader()) |
| 1938 | assert stream.read(5) == b'hello' |
| 1939 | |
| 1940 | |
| 1941 | def test_input_stream_file_path(tmpdir): |
nothing calls this directly
no test coverage detected