#NEWLINE# def testSmoke( self ) : #NEWLINE# #INDENT# tmp_files = set ( ) #NEWLINE# final_files = set ( ) #NEWLINE# for shard_num in range ( self . NUM_SHARDS ) : #NEWLINE# #INDENT# shard = self . create_shard_state ( shard_num ) #NEWLINE# writer = self . WRITER_CLS . create ( self . mr_state . mapreduce_spec , shard . shard_number , 0 ) #NEWLINE# tmp_file = writer . _streaming_buffer . name #NEWLINE# self . assertTrue ( ( self . WRITER_CLS . _MR_TMP in tmp_file ) ) #NEWLINE# tmp_files . add ( tmp_file ) #NEWLINE# cxt = context . Context ( self . mr_state . mapreduce_spec , shard ) #NEWLINE# writer . finalize ( tmp_files , shard ) #NEWLINE# self . assertEqual ( writer . _streaming_buffer . name , ( shard . writer_state [ self . WRITER_CLS . _SEG_PREFIX ] + str ( shard . writer_state [ self . WRITER_CLS . _LAST_SEG_INDEX ] ) ) ) #NEWLINE# final_file = shard . writer_state [ 'filename' ] #NEWLINE# self . assertFalse ( ( self . WRITER_CLS . _MR_TMP in final_file ) ) #NEWLINE# final_files . add ( final_file ) #NEWLINE# #UNINDENT# self . assertEqual ( self . NUM_SHARDS , len ( tmp_files ) ) #NEWLINE# self . assertEqual ( self . NUM_SHARDS , len ( final_files ) )