def test_cython_char_coder(self): data = ['flink', '🐿'] python_field_coders = [ coder_impl.CharCoderImpl() for _ in range(len(data)) ] cython_field_coders = [ coder_impl_fast.CharCoderImpl() for _ in range(len(data)) ] self.check_cython_coder(python_field_coders, cython_field_coders, data)
def test_cython_map_coder(self): data = [{'flink': 1, 'pyflink': 2, 'coder': None}] python_field_coders = [coder_impl.MapCoderImpl(coder_impl.CharCoderImpl(), coder_impl.BigIntCoderImpl()) for _ in range(len(data))] cython_field_coders = [coder_impl_fast.MapCoderImpl(coder_impl_fast.CharCoderImpl(), coder_impl_fast.BigIntCoderImpl()) for _ in range(len(data))] self.check_cython_coder(python_field_coders, cython_field_coders, [data])