Commit da9747ec authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

try to find appropriate target solvers only from solver category related solvers.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36599 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1cf6f014
...@@ -200,15 +200,18 @@ class SolverTool(TypeProvider): ...@@ -200,15 +200,18 @@ class SolverTool(TypeProvider):
# etc. same # etc. same
def searchTargetSolverList(self, divergence_tester, def searchTargetSolverList(self, divergence_tester,
tested_base_category_list=None, **kw): simulation_movement,
automatic_solver_only=False, **kw):
""" """
this method returns a list of target solvers, as predicates against this method returns a list of target solvers, as predicates against
divergence tester. simulation movement.
""" """
domain_tool = getToolByName(self.getPortalObject(), "portal_domains") # Target Solver only works for non-legacy testers.
if not interfaces.IEquivalenceTester.providedBy(divergence_tester):
solver_list = domain_tool.searchPredicateList( return []
context=divergence_tester, portal_type='Solver Type', solver_list = divergence_tester.getSolverValueList()
tested_base_category_list=tested_base_category_list, **kw) if automatic_solver_only:
return [x for x in solver_list if x.isAutomaticSolver() and \
return solver_list x.test(simulation_movement, **kw)]
else:
return [x for x in solver_list if x.test(simulation_movement, **kw)]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment