summaryrefslogtreecommitdiff
path: root/src/scripts/pyolian
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2018-11-28 21:39:51 +0100
committerDave Andreoli <dave@gurumeditation.it>2018-11-28 21:39:51 +0100
commitccb3e81046f28fa39b0278b799d547f693c6b12a (patch)
tree53e206a968820836b63bb7bc01751dff62848cce /src/scripts/pyolian
parent433b561e276b8965dcc109773e6a3bc05897c322 (diff)
Pyolian: fixes for recent eolian changes
Diffstat (limited to 'src/scripts/pyolian')
-rw-r--r--src/scripts/pyolian/eolian.py10
-rwxr-xr-xsrc/scripts/pyolian/test_eolian.py1
2 files changed, 3 insertions, 8 deletions
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py
index 49d288df89..0df4bc8f10 100644
--- a/src/scripts/pyolian/eolian.py
+++ b/src/scripts/pyolian/eolian.py
@@ -700,7 +700,7 @@ class Class(Object):
700 def do_class_recursive(cls): 700 def do_class_recursive(cls):
701 if cls.parent: 701 if cls.parent:
702 L.append(cls.parent) 702 L.append(cls.parent)
703 for other in cls.inherits: 703 for other in cls.extensions:
704 if other not in L: 704 if other not in L:
705 L.append(other) 705 L.append(other)
706 do_class_recursive(other) 706 do_class_recursive(other)
@@ -711,17 +711,13 @@ class Class(Object):
711 @cached_property 711 @cached_property
712 def hierarchy(self): 712 def hierarchy(self):
713 L = [] 713 L = []
714 base = self.base_class 714 base = self.parent
715 while base: 715 while base:
716 L.append(base) 716 L.append(base)
717 base = base.base_class 717 base = base.parent
718 return L 718 return L
719 719
720 @cached_property 720 @cached_property
721 def base_class(self):
722 return self.parent
723
724 @cached_property
725 def ctor_enable(self): 721 def ctor_enable(self):
726 return bool(lib.eolian_class_ctor_enable_get(self)) 722 return bool(lib.eolian_class_ctor_enable_get(self))
727 723
diff --git a/src/scripts/pyolian/test_eolian.py b/src/scripts/pyolian/test_eolian.py
index a1ab85b2e3..23f172c4c3 100755
--- a/src/scripts/pyolian/test_eolian.py
+++ b/src/scripts/pyolian/test_eolian.py
@@ -327,7 +327,6 @@ class TestEolianClass(unittest.TestCase):
327 self.assertIsNone(cls.eo_prefix) # TODO fin a class with a value 327 self.assertIsNone(cls.eo_prefix) # TODO fin a class with a value
328 self.assertIsNone(cls.event_prefix) # TODO same as above 328 self.assertIsNone(cls.event_prefix) # TODO same as above
329 self.assertIsNone(cls.data_type) # TODO same as above 329 self.assertIsNone(cls.data_type) # TODO same as above
330 self.assertEqual(cls.base_class.name, 'Efl.Loop_Consumer')
331 self.assertEqual(cls.parent.name, 'Efl.Loop_Consumer') 330 self.assertEqual(cls.parent.name, 'Efl.Loop_Consumer')
332 self.assertEqual([c.name for c in cls.extensions], []) 331 self.assertEqual([c.name for c in cls.extensions], [])
333 self.assertEqual([c.name for c in cls.hierarchy], ['Efl.Loop_Consumer', 'Efl.Object']) 332 self.assertEqual([c.name for c in cls.hierarchy], ['Efl.Loop_Consumer', 'Efl.Object'])