From 3e96d30d18036cc18d75f58a90486a2958080712 Mon Sep 17 00:00:00 2001 From: John Chapman <jchapman@cern.ch> Date: Fri, 8 Feb 2019 11:21:48 +0100 Subject: [PATCH] Fix G4AtlasApps configuration unit tests `test_AtlasG4_cosmics_configuration.py` and `test_TestBeam_tf_configuration.py` have been updated to take into account the fact that `xAODMaker::EventInfoCnvAlg/xAODMaker::EventInfoCnvAlg` has been added to the start of the AlgSequence of all jobs which generate events on-the-fly. --- .../G4AtlasApps/test/test_AtlasG4_cosmics_configuration.py | 4 ++-- .../G4AtlasApps/test/test_TestBeam_tf_configuration.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Simulation/G4Atlas/G4AtlasApps/test/test_AtlasG4_cosmics_configuration.py b/Simulation/G4Atlas/G4AtlasApps/test/test_AtlasG4_cosmics_configuration.py index f4fdf09cfe3..bc8b98324dd 100755 --- a/Simulation/G4Atlas/G4AtlasApps/test/test_AtlasG4_cosmics_configuration.py +++ b/Simulation/G4Atlas/G4AtlasApps/test/test_AtlasG4_cosmics_configuration.py @@ -113,7 +113,7 @@ class TestAtlasG4Cosmics(unittest.TestCase): ath_alg_seqence_as_str = self._job_config_dict['AthAlgSeq']['Members'] # need to evaluate to obtain actual Python object ath_alg_seqence_list = eval(ath_alg_seqence_as_str) - actual_last_ath_alg_sequence_entry = ath_alg_seqence_list[0] + actual_last_ath_alg_sequence_entry = ath_alg_seqence_list[1] # xAODMaker::EventInfoCnvAlg/xAODMaker::EventInfoCnvAlg is in position 0 in master now. expected_last_ath_alg_sequence_entry = "CosmicGenerator/CosmicGenerator" self.assertEqual(expected_last_ath_alg_sequence_entry, actual_last_ath_alg_sequence_entry) @@ -198,7 +198,7 @@ class TestAtlasG4Cosmics(unittest.TestCase): ath_alg_seqence_as_str = self._job_config_dict['AthAlgSeq']['Members'] # need to evaluate to obtain actual Python object ath_alg_seqence_list = eval(ath_alg_seqence_as_str) - actual_last_ath_alg_sequence_entry = ath_alg_seqence_list[2] # Position 1 is the Sim Timer Alg + actual_last_ath_alg_sequence_entry = ath_alg_seqence_list[3] # Position 1 is the Sim Timer Alg, xAODMaker::EventInfoCnvAlg/xAODMaker::EventInfoCnvAlg is in position 0 in master now expected_last_ath_alg_sequence_entry = "Simulation::BeamEffectsAlg/BeamEffectsAlg" self.assertEqual(expected_last_ath_alg_sequence_entry, actual_last_ath_alg_sequence_entry) diff --git a/Simulation/G4Atlas/G4AtlasApps/test/test_TestBeam_tf_configuration.py b/Simulation/G4Atlas/G4AtlasApps/test/test_TestBeam_tf_configuration.py index 80cc35496f1..af6d85d9ebc 100755 --- a/Simulation/G4Atlas/G4AtlasApps/test/test_TestBeam_tf_configuration.py +++ b/Simulation/G4Atlas/G4AtlasApps/test/test_TestBeam_tf_configuration.py @@ -107,7 +107,7 @@ class TestTestBeam(unittest.TestCase): ath_alg_seqence_as_str = self._job_config_dict['AthAlgSeq']['Members'] # need to evaluate to obtain actual Python object ath_alg_seqence_list = eval(ath_alg_seqence_as_str) - actual_last_ath_alg_sequence_entry = ath_alg_seqence_list[0] + actual_last_ath_alg_sequence_entry = ath_alg_seqence_list[1] # xAODMaker::EventInfoCnvAlg/xAODMaker::EventInfoCnvAlg is in position 0 in master now expected_last_ath_alg_sequence_entry = "PyAthena::Alg/ParticleGun" self.assertEqual(expected_last_ath_alg_sequence_entry, actual_last_ath_alg_sequence_entry) @@ -117,7 +117,7 @@ class TestTestBeam(unittest.TestCase): ath_alg_seqence_as_str = self._job_config_dict['AthAlgSeq']['Members'] # need to evaluate to obtain actual Python object ath_alg_seqence_list = eval(ath_alg_seqence_as_str) - actual_last_ath_alg_sequence_entry = ath_alg_seqence_list[1] + actual_last_ath_alg_sequence_entry = ath_alg_seqence_list[2] # xAODMaker::EventInfoCnvAlg/xAODMaker::EventInfoCnvAlg is in position 0 in master now expected_last_ath_alg_sequence_entry = "CopyEventWeight/CopyEventWeight" self.assertEqual(expected_last_ath_alg_sequence_entry, actual_last_ath_alg_sequence_entry) @@ -127,7 +127,7 @@ class TestTestBeam(unittest.TestCase): ath_alg_seqence_as_str = self._job_config_dict['AthAlgSeq']['Members'] # need to evaluate to obtain actual Python object ath_alg_seqence_list = eval(ath_alg_seqence_as_str) - actual_last_ath_alg_sequence_entry = ath_alg_seqence_list[2] + actual_last_ath_alg_sequence_entry = ath_alg_seqence_list[3] # xAODMaker::EventInfoCnvAlg/xAODMaker::EventInfoCnvAlg is in position 0 in master now expected_last_ath_alg_sequence_entry = "Simulation::BeamEffectsAlg/BeamEffectsAlg" self.assertEqual(expected_last_ath_alg_sequence_entry, actual_last_ath_alg_sequence_entry) -- GitLab