#NEWLINE# def test_files_from_different_blocks( self ) : #NEWLINE# #INDENT# "This test solves the bug that appeared when user included 2 different headers\n        from different blocks A, B, such A->B, and the files included were not modified among\n        different versions.\n\n        The problem was the finder discarding subsequent hypothesis because it thought they will\n        be the same based on ids (cells, contents) and dep_table. This is not true, they might\n        not have changed, but their dependencies have changed, so every block_version must have\n        it's own hypothesis\n        " #NEWLINE# brl_a = BRLBlock ( ( '%s/%s/%s/master' % ( version_a0 . user , self . user , 'blocka' ) ) ) #NEWLINE# names = [ BlockCellName ( ( self . user + ( '/blocka/path/to/a%d.h' % i ) ) ) for i in range ( 1 , 3 ) ] #NEWLINE# resources_info = { ( 'path/to/a%d.h' % i ) : ( 'a' , ( [ names [ 0 ] ] if ( i == 2 ) else [ ] ) ) for i in range ( 1 , 3 ) } #NEWLINE# publisher = TestPublisher ( self . user , self . store ) #NEWLINE# publisher . publish ( brl_a , resources_info ) #NEWLINE# version_a0 = BlockVersion ( brl_a , 0 ) #NEWLINE# brl_b = BRLBlock ( ( '%s/%s/%s/master' % ( self . user , self . user , 'blockb' ) ) ) #NEWLINE# publisher . publish ( brl_b , { #NEWLINE# #INDENT# 'path/to/b.h' : ( 'b' , [ names [ 1 ] ] ) , #NEWLINE# #UNINDENT# } , dep_versions = version_a0 ) #NEWLINE# for i in range ( 2 ) : #NEWLINE# #INDENT# publisher . publish ( brl_b , { #NEWLINE# #INDENT# 'path/to/b2.h' : ( 'b' , [ ] ) , #NEWLINE# #UNINDENT# } , dep_versions = version_a0 ) #NEWLINE# #UNINDENT# publisher . publish ( brl_a , { #NEWLINE# #INDENT# 'path/to/a1.h' : ( 'a' , [ ] ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# request = self . build_unresolved_request ( [ 'find_user/blocka/path/to/a2.h' , 'find_user/blockb/path/to/b.h' ] ) #NEWLINE# result = self . service . find ( request , BiiResponse ( ) ) #NEWLINE# self . check_result ( result , resolved = [ ( brl_a , 0 , { 'find_user/blocka/path/to/a2.h' } ) , ( brl_b , 2 , { 'find_user/blockb/path/to/b.h' } ) ] )