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

Function test_transcoding_encoding_error

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

Source from the content-addressed store, hash-verified

1880 ('utf-8', 'latin-1'),
1881 ])
1882def test_transcoding_encoding_error(src_encoding, dest_encoding):
1883 # Character \u0100 cannot be represented in the destination encoding
1884 stream = pa.transcoding_input_stream(
1885 pa.BufferReader("\u0100".encode(src_encoding)),
1886 src_encoding,
1887 dest_encoding)
1888 with pytest.raises(UnicodeEncodeError):
1889 stream.read(1)
1890
1891
1892@pytest.mark.parametrize('src_encoding, dest_encoding',

Callers

nothing calls this directly

Calls 3

BufferReaderMethod · 0.80
encodeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected