Exemple #1
0
 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))
Exemple #2
0
    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))