From 1df4190c0a7625ebba83107c2ce1ce9288a76efc Mon Sep 17 00:00:00 2001 From: Lauro Moura Date: Tue, 26 Nov 2019 11:55:01 -0300 Subject: [PATCH] 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 --- src/scripts/pyolian/eolian.py | 1 + src/scripts/pyolian/test_eolian.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py index 9ab6abd..31f4f06 100644 --- a/src/scripts/pyolian/eolian.py +++ b/src/scripts/pyolian/eolian.py @@ -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) diff --git a/src/scripts/pyolian/test_eolian.py b/src/scripts/pyolian/test_eolian.py index 4aa4588..b6090c6 100755 --- a/src/scripts/pyolian/test_eolian.py +++ b/src/scripts/pyolian/test_eolian.py @@ -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 -- 2.7.4