Skip to content
Snippets Groups Projects
Commit 2fc49964 authored by Christoph Hasse's avatar Christoph Hasse :cartwheel_tone1:
Browse files

add check for logic in test_vector_functors

parent d5036c04
No related branches found
No related tags found
1 merge request!2699FunctorFactory, replace CLING backend with native compiler
......@@ -44,8 +44,9 @@ if not inside_cache_generation:
def add_algorithm(type_suffix, eval_or_init, functors, producer=None):
algo_type = getattr(Algorithms,
'TestThOrFunctor' + eval_or_init + '__' + type_suffix)
algo_type_str = 'TestThOrFunctor' + eval_or_init + '__' + type_suffix
algo_type = getattr(Algorithms, algo_type_str)
functors = {f.code_repr(): f for f in functors}
kwargs = {}
if producer is not None:
......@@ -58,7 +59,14 @@ def add_algorithm(type_suffix, eval_or_init, functors, producer=None):
PODFunctors={k: POD(v)
for k, v in functors.items()},
**kwargs).configuration().apply()
# Get the TestThOrFunctor algorithm which we (knowing some PyConf
# externals) should be able to find as the last element in the list
algo_instance = configurable_algs[-1]
# check that the trick from above actually returns the algorithm that we
# are looking for.
if algo_type_str != algo_instance.getType():
raise Exception("test_vector_functors.py: our trick didn't work")
ApplicationMgr().TopAlg.append(algo_instance)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment