#NEWLINE# @ given ( start_action_messages , message_dicts , message_dicts , integers ( min_value = 2 ) ) #NEWLINE# def test_duplicate_task_level( self , start_message , child1 , child2 , index ) : #NEWLINE# #INDENT# "\n        If we try to add a child to an action that has a task level that's the\n        same as the task level of an existing child, we raise an error.\n        " #NEWLINE# parent_level = start_message . task_level . parent ( ) . level #NEWLINE# messages = [ written_from_pmap ( union ( child_message , { #NEWLINE# #INDENT# TASK_UUID_FIELD : start_message . task_uuid , #NEWLINE# TASK_LEVEL_FIELD : parent_level . append ( index ) , #NEWLINE# #UNINDENT# } ) ) for child_message in [ child1 , child2 ] ] #NEWLINE# assume ( ( messages [ 0 ] != messages [ 1 ] ) ) #NEWLINE# self . assertRaises ( DuplicateChild , WrittenAction . from_messages , start_message , messages )