#NEWLINE# def test_remove_entity( self ) : #NEWLINE# #INDENT# from grease import World , Entity #NEWLINE# world = World ( ) #NEWLINE# comp1 = world . components . one = TestComponent ( ) #NEWLINE# comp2 = world . components . two = TestComponent ( ) #NEWLINE# comp3 = world . components . three = TestComponent ( ) #NEWLINE# entity = Entity ( comp1 ) #NEWLINE# comp1 . add ( entity ) #NEWLINE# comp2 . add ( entity ) #NEWLINE# self . assertTrue ( ( entity in world . entities ) ) #NEWLINE# self . assertTrue ( ( entity in comp1 ) ) #NEWLINE# self . assertTrue ( ( entity in comp2 ) ) #NEWLINE# self . assertFalse ( ( entity in comp3 ) ) #NEWLINE# world . entities . remove ( entity ) #NEWLINE# self . assertFalse ( ( entity in world . entities ) ) #NEWLINE# self . assertFalse ( ( entity in comp1 ) ) #NEWLINE# self . assertFalse ( ( entity in comp2 ) ) #NEWLINE# self . assertFalse ( ( entity in comp3 ) ) #NEWLINE# self . assertRaises ( KeyError , world . entities . remove , entity )