def test_World_delete(self): w = World() e1 = Entity(w) e2 = Entity(w) assert len(w.entities) == 2 w.delete(e1) assert len(w.entities) == 1 w.delete(e2) assert len(w.entities) == 0 # The next two should have no effect w.delete(e1) w.delete(e2)
def test_World_delete(self): w = World() e1 = Entity(w) e2 = Entity(w) self.assertEqual(len(w.entities), 2) w.delete(e1) self.assertEqual(len(w.entities), 1) w.delete(e2) self.assertEqual(len(w.entities), 0) # The next two should have no effect w.delete(e1) w.delete(e2)