pyolian: full_inherit must recurse parent too

Test Plan: run tests

Reviewers: segfaultxavi, herb, DaveMDS, felipealmeida

Reviewed By: felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10420
This commit is contained in:
Lauro Moura 2019-11-26 11:55:01 -03:00
parent 11094aeaaf
commit 0acc840f19
2 changed files with 6 additions and 0 deletions

View File

@ -739,6 +739,7 @@ class Class(Object):
def do_class_recursive(cls):
if cls.parent:
li.append(cls.parent)
do_class_recursive(cls.parent)
for other in cls.extensions:
if other not in li:
li.append(other)

View File

@ -699,3 +699,8 @@ class TestEolianExpression(object):
# exp.binary_operator # TODO find a better test (only works for BINARY expr)
# exp.binary_lhs # TODO find a better test (only works for BINARY expr)
# exp.binary_rhs # TODO find a better test (only works for BINARY expr)
class TestEolianInherits(object):
def test_inherits_full(self, eolian_db):
cls = eolian_db.class_by_name_get('Efl.Ui.Widget')
assert 'Efl.Object' in cls.inherits_full