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):
# etc. same
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
divergence tester.
"""
domain_tool = getToolByName(self.getPortalObject(), "portal_domains")
solver_list = domain_tool.searchPredicateList(
context=divergence_tester, portal_type='Solver Type',
tested_base_category_list=tested_base_category_list, **kw)
return solver_list
simulation movement.
"""
# Target Solver only works for non-legacy testers.
if not interfaces.IEquivalenceTester.providedBy(divergence_tester):
return []
solver_list = divergence_tester.getSolverValueList()
if automatic_solver_only:
return [x for x in solver_list if x.isAutomaticSolver() and \
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