MCPcopy Create free account
hub / github.com/apache/arrow / test_transcoding_decoding_error

Function test_transcoding_decoding_error

python/pyarrow/tests/test_io.py:1896–1903  ·  view source on GitHub ↗
(src_encoding, dest_encoding)

Source from the content-addressed store, hash-verified

1894 ('utf-16', 'utf-8'),
1895 ])
1896def test_transcoding_decoding_error(src_encoding, dest_encoding):
1897 # The given bytestring is not valid in the source encoding
1898 stream = pa.transcoding_input_stream(
1899 pa.BufferReader(b"\xff\xff\xff\xff"),
1900 src_encoding,
1901 dest_encoding)
1902 with pytest.raises(UnicodeError):
1903 stream.read(1)
1904
1905
1906# ----------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

BufferReaderMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected