#NEWLINE# def testGetNeighboursByEdgeType( self ) : #NEWLINE# #INDENT# sMultiGraph = SparseMultiGraph ( self . vList , sMultiGraph . maxEdgeTypes , True ) #NEWLINE# sMultiGraph . addEdge ( 0 , 1 , 2 ) #NEWLINE# sMultiGraph . addEdge ( 0 , 3 , 1 ) #NEWLINE# sMultiGraph . addEdge ( 2 , 1 , 0 ) #NEWLINE# sMultiGraph . addEdge ( 1 , 4 , 0 ) #NEWLINE# sMultiGraph . addEdge ( 9 , 4 , 0 ) #NEWLINE# sMultiGraph . addEdge ( 9 , 4 , 1 ) #NEWLINE# self . assertEquals ( sMultiGraph . getNeighboursByEdgeType ( 0 , 1 ) , [ 3 ] ) #NEWLINE# self . assertEquals ( sMultiGraph . getNeighboursByEdgeType ( 0 , 2 ) , [ 1 ] ) #NEWLINE# self . assertEquals ( sMultiGraph . getNeighboursByEdgeType ( 0 , 0 ) , [ ] ) #NEWLINE# self . assertEquals ( set ( sMultiGraph . getNeighboursByEdgeType ( 4 , 0 ) ) , set ( [ 1 , 9 ] ) )