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