#NEWLINE# def test_write_codec( self ) : #NEWLINE# #INDENT# with open ( osp . join ( uncompressed_size . dpath , 'weather.jsonl' ) ) as reader : #NEWLINE# #INDENT# main ( [ 'write' , 'weather.avro' , '--schema' , dumps ( self . schema ) , '--codec' , 'deflate' ] , client = self . client , stdin = reader ) #NEWLINE# #UNINDENT# with AvroReader ( self . client , 'weather.avro' ) as reader : #NEWLINE# #INDENT# records = list ( reader ) #NEWLINE# #UNINDENT# eq_ ( records , self . records ) #NEWLINE# compressed_size = self . client . content ( 'weather.avro' ) [ 'length' ] #NEWLINE# uncompressed_size = osp . getsize ( osp . join ( self . dpath , 'weather.avro' ) ) #NEWLINE# ok_ ( ( compressed_size != uncompressed_size ) )