#NEWLINE# def test_build_file_rev( self ) : #NEWLINE# #INDENT# with pushd ( self . root_dir ) : #NEWLINE# #INDENT# subprocess . check_call ( [ 'git' , 'init' ] ) #NEWLINE# subprocess . check_call ( [ 'git' , 'config' , 'user.email' , 'you@example.com' ] ) #NEWLINE# subprocess . check_call ( [ 'git' , 'config' , 'user.name' , 'Your Name' ] ) #NEWLINE# subprocess . check_call ( [ 'git' , 'add' , '.' ] ) #NEWLINE# subprocess . check_call ( [ 'git' , 'commit' , '-minitial commit' ] ) #NEWLINE# subprocess . check_call ( [ 'rm' , '-rf' , 'path-that-does-exist' , 'grandparent' , 'BUILD' , 'BUILD.twitter' ] ) #NEWLINE# self . _project_tree = ScmProjectTree ( my_buildfile . root_dir , Git ( worktree = self . root_dir ) , 'HEAD' ) #NEWLINE# my_buildfile = self . create_buildfile ( 'grandparent/parent/BUILD' ) #NEWLINE# buildfile = self . create_buildfile ( 'grandparent/parent/BUILD.twitter' ) #NEWLINE# self . assertEquals ( OrderedSet ( [ my_buildfile , buildfile ] ) , OrderedSet ( self . get_build_files_family ( 'grandparent/parent' ) ) ) #NEWLINE# self . assertEquals ( OrderedSet ( [ self . create_buildfile ( 'grandparent/parent/child2/child3/BUILD' ) ] ) , OrderedSet ( self . get_build_files_family ( 'grandparent/parent/child2/child3' ) ) ) #NEWLINE# buildfiles = self . scan_buildfiles ( 'grandparent' ) #NEWLINE# self . assertEquals ( OrderedSet ( [ self . create_buildfile ( 'grandparent/parent/BUILD' ) , self . create_buildfile ( 'grandparent/parent/BUILD.twitter' ) , self . create_buildfile ( 'grandparent/parent/child1/BUILD' ) , self . create_buildfile ( 'grandparent/parent/child1/BUILD.twitter' ) , self . create_buildfile ( 'grandparent/parent/child2/child3/BUILD' ) , self . create_buildfile ( 'grandparent/parent/child5/BUILD' ) ] ) , buildfiles )