MCPcopy
hub / github.com/uber/petastorm / test_byte_string

Function test_byte_string

petastorm/tests/test_codec_scalar.py:25–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24
25def test_byte_string():
26 codec = ScalarCodec(StringType())
27 field = UnischemaField(name='field_string', numpy_dtype=np.string_, shape=(), codec=codec, nullable=False)
28
29 assert codec.decode(field, codec.encode(field, 'abc')) == b'abc'
30 assert codec.decode(field, codec.encode(field, '')) == b''
31
32
33def test_unicode():

Callers

nothing calls this directly

Calls 4

decodeMethod · 0.95
encodeMethod · 0.95
ScalarCodecClass · 0.90
UnischemaFieldClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…