#NEWLINE# def emits_not_( gen , unwanted_actions ) : #NEWLINE# #INDENT# assert isinstance ( unwanted_actions , list ) #NEWLINE# actions = list ( flatten ( gen ) ) #NEWLINE# ok_ ( ( not any ( ( any ( ( ( x == y ) for y in actions ) ) for x in x ) ) ) , ( 'actions contained the unwanted %r' % ( list ( set ( unwanted_actions ) . intersection ( set ( actions ) ) ) , ) ) )