#NEWLINE# def test_set_zero_based_changes_the_index_base( self ) : #NEWLINE# #INDENT# expected_alignments = [ ( { #NEWLINE# #INDENT# 'query_sequence' : 'AGTCACGCGCGCCGCCGGGGGGCCGGCCGGCGCCGGGGGGCGCCCCGGGCGGGGC' , #NEWLINE# 'target_sequence' : 'CGCGCGCCGCCGGGGGGCCGGCCGGCGCCGGGGGGCGCCCCGGGCGGGGC' , #NEWLINE# #UNINDENT# } , True ) , ( { #NEWLINE# #INDENT# 'query_sequence' : 'AGTCACGCGCGCCGCCGGGGGGCCGGCCGGCGCCGGGGGGCGCCCCGGGCGGGGC' , #NEWLINE# 'target_sequence' : 'CGCGCGCCGCCGGGGGGCCGGCCGGCGCCGGGGGGCGCCCCGGGCGGGGC' , #NEWLINE# #UNINDENT# } , False ) ] #NEWLINE# for ( expected , z ) in expected_alignments : #NEWLINE# #INDENT# query = StripedSmithWaterman ( expected_alignments [ 'query_sequence' ] , zero_index = z ) #NEWLINE# alignment = query ( expected [ 'target_sequence' ] ) #NEWLINE# alignment . set_zero_based ( ( not z ) ) #NEWLINE# self . assertEqual ( ( not z ) , alignment . is_zero_based ( ) )