summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-07-12 17:00:38 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-08-16 17:04:59 -0300
commit92186556036f727d6caf742e558880ad3eec19e3 (patch)
tree9d94ee093d7818c3704a9e8d234b8bb066945cf0
parente49d60cf35e73663bc748fcf511e1a373f0e9416 (diff)
downloadefl-92186556036f727d6caf742e558880ad3eec19e3.tar.gz
tct: Filter out protected methods
-rw-r--r--src/scripts/testgen/suitegen.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/scripts/testgen/suitegen.py b/src/scripts/testgen/suitegen.py
index 5811c0af9e..cdae677052 100644
--- a/src/scripts/testgen/suitegen.py
+++ b/src/scripts/testgen/suitegen.py
@@ -1,6 +1,6 @@
import itertools
import os
-from pyolian.eolian import Eolian_Function_Type, Eolian_Class_Type
+from pyolian.eolian import Eolian_Function_Type, Eolian_Class_Type, Eolian_Object_Scope
from .ekeys import GetKey, Function_List_Type
from pyolian import eolian
@@ -99,10 +99,17 @@ class ClassItem(ComItem):
self.myname = os.path.splitext(comp.file)[0]
super().__init__(comp, os.path.join(path, self.myname), keys)
- mfilter = (
- lambda f: f.full_c_method_name not in self.keys.blacklist
- and not os.path.isfile(os.path.join(self.path, f.name))
- )
+ def mfilter(f):
+ if f.full_c_method_name in self.keys.blacklist:
+ return False
+
+ if os.path.isfile(os.path.join(self.path, f.name)):
+ return False
+
+ if f.method_scope != Eolian_Object_Scope.PUBLIC:
+ return False
+
+ return True
def get_all_inherited(leaf, getter):
print("Getting all items for leaf", leaf)