def test_World_get_entities(self): w = World() e1 = PositionEntity(w, 1, 1) e2 = PositionEntity(w, 1, 2) assert len(w.get_entities(e1.position)) == 1 e2.position.y = 1 assert len(w.get_entities(e1.position)) == 2
def test_World_get_entities(self): w = World() e1 = PositionEntity(w, 1, 1) e2 = PositionEntity(w, 1, 2) self.assertEqual(len(w.get_entities(e1.position)), 1) e2.position.y = 1 self.assertEqual(len(w.get_entities(e1.position)), 2)