Beispiel #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.itervalues()), sorted(ed))
Beispiel #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.itervalues()), sorted(ed))