#NEWLINE# def test_event_dag_complement( self ) : #NEWLINE# #INDENT# mockInputEvent = MockInputEvent ( ) #NEWLINE# mockInputEvent2 = MockInputEvent ( ) #NEWLINE# events = [ MockInternalEvent ( 'a' ) , mockInputEvent , mockInputEvent2 ] #NEWLINE# event_dag = EventDag ( events ) #NEWLINE# self . assertEqual ( event_dag . events , event_dag . input_complement ( [ ] ) . events ) #NEWLINE# self . assertEqual ( event_dag . events [ 0 : 1 ] , event_dag . input_complement ( events ) . events ) #NEWLINE# sub_graph = event_dag . input_complement ( [ mockInputEvent ] ) #NEWLINE# self . assertEqual ( [ e for ( i , e ) in enumerate ( self . events ) if ( ( i == 0 ) or ( i == 2 ) ) ] , sub_graph . events )