diff --git a/Phys/DaVinci/tests/config/test_algorithms.py b/Phys/DaVinci/tests/config/test_algorithms.py index 3c73294bb50f9787ef85cd6d601e7fc5397a6679..87fce71326678696f6526071a83e3015b97eabb3 100644 --- a/Phys/DaVinci/tests/config/test_algorithms.py +++ b/Phys/DaVinci/tests/config/test_algorithms.py @@ -9,6 +9,8 @@ # or submit itself to any jurisdiction. # ############################################################################### from PyConf.Algorithms import Gaudi__Examples__VoidConsumer as VoidConsumer +from PyConf.components import Algorithm +from PyConf import components from DaVinci import Options from DaVinci.algorithms import (make_fsr_algs, create_lines_filter, add_filter, @@ -18,7 +20,15 @@ from PyConf.application import default_raw_event from GaudiConf.LbExec import InputProcessTypes +def reset_global_store(algorithm_store={}): + old_algorithm_store = Algorithm._algorithm_store + Algorithm._algorithm_store = algorithm_store + components._IDENTITY_TABLE.clear() + return old_algorithm_store + + def test_define_write_fsr(): + reset_global_store() """ Check if DaVinci imports correctly the algorithm to merge and write FSRs. """ @@ -35,6 +45,7 @@ def test_define_write_fsr(): def test_add_hlt2_filter(): + reset_global_store() """ Check if DaVinci is able to implement correctly a filter on an HLT2 line. """ @@ -58,6 +69,7 @@ def test_add_hlt2_filter(): def test_add_spruce_filter(): + reset_global_store() """ Check if DaVinci is able to implement correctly a filter on a Sprucing line. """ @@ -77,6 +89,7 @@ def test_add_spruce_filter(): def test_add_void_filter(): + reset_global_store() """ Check if DaVinci is able to implement correcty a Void filter if 'HLT_PASS' string is not found in the filter code." @@ -92,6 +105,7 @@ def test_add_void_filter(): def test_apply_filters(): + reset_global_store() """ Check if DaVinci applies correctly a filter in front of a given algorithm """ @@ -113,6 +127,7 @@ def test_apply_filters(): def test_configured_funtuple(): + reset_global_store() """ Check if the configured_FunTuple provides a correct instance of FunTuple. """ @@ -146,6 +161,7 @@ def test_configured_funtuple(): def test_get_odin(): + reset_global_store() """ Check if get_odin provides a correct instance of ODIN. """ @@ -164,6 +180,7 @@ def test_get_odin(): def test_get_decreports(): + reset_global_store() """ Check if get_decreports provide a correct instance of HltDecReportsDecoder. """