def test_iter(self): from grease.component import Component c = Component() c.set_world(world) self.assertEqual(list(c), []) ed = [c.set(TestEntity()), c.set(TestEntity()), c.set(TestEntity())] self.assertEqual(sorted(c.values()), sorted(ed))