#NEWLINE# def testComparable( self ) : #NEWLINE# #INDENT# 'Tests the path specification comparable property.' #NEWLINE# path_spec = tsk_partition_path_spec . TSKPartitionPathSpec ( parent = self . _path_spec ) #NEWLINE# self . assertIsNotNone ( path_spec ) #NEWLINE# expected_comparable = '\n' . join ( [ 'type: TEST' , 'type: TSK_PARTITION' , '' ] ) #NEWLINE# self . assertEqual ( path_spec . comparable , self ) #NEWLINE# path_spec = tsk_partition_path_spec . TSKPartitionPathSpec ( location = '/p2' , parent = self . _path_spec ) #NEWLINE# self . assertIsNotNone ( path_spec ) #NEWLINE# expected_comparable = '\n' . join ( [ 'type: TEST' , 'type: TSK_PARTITION, location: /p2' , '' ] ) #NEWLINE# self . assertEqual ( path_spec . comparable , expected_comparable ) #NEWLINE# path_spec = tsk_partition_path_spec . TSKPartitionPathSpec ( part_index = 1 , parent = self . _path_spec ) #NEWLINE# self . assertIsNotNone ( path_spec ) #NEWLINE# expected_comparable = '\n' . join ( [ 'type: TEST' , 'type: TSK_PARTITION, part index: 1' , '' ] ) #NEWLINE# self . assertEqual ( path_spec . comparable , expected_comparable ) #NEWLINE# path_spec = tsk_partition_path_spec . TSKPartitionPathSpec ( start_offset = 8192 , parent = self . _path_spec ) #NEWLINE# self . assertIsNotNone ( path_spec ) #NEWLINE# expected_comparable = '\n' . join ( [ 'type: TEST' , 'type: TSK_PARTITION, start offset: 0x00002000' , '' ] ) #NEWLINE# self . assertEqual ( path_spec . comparable , expected_comparable ) #NEWLINE# path_spec = tsk_partition_path_spec . TSKPartitionPathSpec ( location = '/p2' , part_index = 1 , parent = self . _path_spec ) #NEWLINE# self . assertIsNotNone ( path_spec ) #NEWLINE# expected_comparable = '\n' . join ( [ 'type: TEST' , 'type: TSK_PARTITION, location: /p2, part index: 1' , '' ] ) #NEWLINE# self . assertEqual ( path_spec . comparable , expected_comparable )