From bce775e45ef41ad968bb7393b967680e3ead4ca4 Mon Sep 17 00:00:00 2001 From: Sebastien Ponce <sebastien.ponce@cern.ch> Date: Tue, 21 Feb 2023 13:15:26 +0100 Subject: [PATCH] Fixed tests depending on algo names --- .../python/FunTuple/functorcollections.py | 2 +- Phys/FunTuple/tests/test_functions.py | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Phys/FunTuple/python/FunTuple/functorcollections.py b/Phys/FunTuple/python/FunTuple/functorcollections.py index efe6a48c1..be8a11a89 100644 --- a/Phys/FunTuple/python/FunTuple/functorcollections.py +++ b/Phys/FunTuple/python/FunTuple/functorcollections.py @@ -163,7 +163,7 @@ def HltTisTos(*, selection_type: str, trigger_lines: List[str], hlt1_dec = get_decreports(selection_type) TisTosRelations = HltTisTosAlg( - name="HltTisTosAlgName", + name="HltTisTosAlgName_{hash}", InputParticles=data, SelReports=hlt1_sel_report, DecReports=hlt1_dec, diff --git a/Phys/FunTuple/tests/test_functions.py b/Phys/FunTuple/tests/test_functions.py index ad5e7115a..3f25debc0 100644 --- a/Phys/FunTuple/tests/test_functions.py +++ b/Phys/FunTuple/tests/test_functions.py @@ -91,7 +91,7 @@ def test_simplest(data_handle, func_name, name_argument): _ = getattr_wrapper( this_module, func_name, - name=name_argument, + name=name_argument + '_{hash}', tuple_name=name_argument, fields=fields, variables=variables, @@ -107,7 +107,7 @@ def test_simple(data_handle, func_name, name_argument): tuple = getattr_wrapper( this_module, func_name, - name=name_argument, + name=name_argument + '_{hash}', tuple_name=name_argument, fields=fields, variables=variables, @@ -134,7 +134,7 @@ def test_simple_with_ALL_field(data_handle, func_name, name_argument): _ = getattr_wrapper( this_module, func_name, - name=name_argument, + name=name_argument + '_{hash}', tuple_name=name_argument, fields=fields, variables=variables, @@ -153,7 +153,7 @@ def test_with_event_variables(data_handle, func_name, name_argument): tuple = getattr_wrapper( this_module, func_name, - name=name_argument, + name=name_argument + '_{hash}', tuple_name=name_argument, fields=fields, variables=variables, @@ -184,7 +184,7 @@ def test_with_loki_preamble(data_handle, func_name, name_argument): tuple = getattr_wrapper( this_module, func_name, - name=name_argument, + name=name_argument + '_{hash}', tuple_name=name_argument, fields=fields, variables=variables, @@ -204,7 +204,7 @@ def test_run_full_counter_mode(data_handle, func_name, name_argument): tuple = getattr_wrapper( this_module, func_name, - name=name_argument, + name=name_argument + '_{hash}', tuple_name=name_argument, fields=fields, variables=variables, @@ -223,7 +223,7 @@ def test_ALL_not_allowed_in_field_names(data_handle, func_name, name_argument): _ = getattr_wrapper( this_module, func_name, - name=name_argument, + name=name_argument + '_{hash}', tuple_name=name_argument, fields=dict(ALL="A -> B C"), # "ALL" is not allowed since special variables=variables, @@ -239,7 +239,7 @@ def test_fields_is_dict(data_handle, func_name, name_argument): _ = getattr_wrapper( this_module, func_name, - name=name_argument, + name=name_argument + '_{hash}', tuple_name=name_argument, fields="A -> B C", # should be a dict variables=variables, @@ -258,7 +258,7 @@ def test_field_name_unused(data_handle, func_name, name_argument): tuple = getattr_wrapper( this_module, func_name, - name=name_argument, + name=name_argument + '_{hash}', tuple_name=name_argument, fields=fields, variables=variables, @@ -287,7 +287,7 @@ def test_field_name_unmatched_to_variable_keys(data_handle, func_name, _ = getattr_wrapper( this_module, func_name, - name=name_argument, + name=name_argument + '_{hash}', tuple_name=name_argument, fields=fields, variables=variables, @@ -303,7 +303,7 @@ def test_variables_is_dict(data_handle, func_name, name_argument): _ = getattr_wrapper( this_module, func_name, - name=name_argument, + name=name_argument + '_{hash}', tuple_name=name_argument, fields=fields, variables=FC.Kinematics(), # should be a dict @@ -320,7 +320,7 @@ def test_variables_key_ALL(data_handle, func_name, name_argument): _ = getattr_wrapper( this_module, func_name, - name=name_argument, + name=name_argument + '_{hash}', tuple_name=name_argument, fields=fields, variables=variables, @@ -347,7 +347,7 @@ def test_variables_all_type_FunctorCollection(data_handle, func_name, _ = getattr_wrapper( this_module, func_name, - name=name_argument, + name=name_argument + '_{hash}', tuple_name=name_argument, fields=fields, variables=variables, @@ -367,7 +367,7 @@ def test_variables_key_ALL_type_FunctorCollection(data_handle, func_name, _ = getattr_wrapper( this_module, func_name, - name=name_argument, + name=name_argument + '_{hash}', tuple_name=name_argument, fields=fields, variables=variables, @@ -387,6 +387,6 @@ def test_ftevent(func_name, name_argument): _ = getattr_wrapper( this_module, func_name, - name=name_argument, + name=name_argument + '_{hash}', tuple_name=name_argument, variables=event_variables) -- GitLab