Skip to content

Commit

Permalink
Check_input_list test
Browse files Browse the repository at this point in the history
  • Loading branch information
Elisa-Visentin committed Oct 16, 2023
1 parent fff4a84 commit df96e74
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions magicctapipe/io/tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,12 @@ def test_check_input_list(config_check):
Test on different dictionaries
"""

try:
check_input_list({'mc_tel_ids':{'LST-1':1, 'LST-2':2, 'LST-3':3, 'LST-4':4, 'MAGIC-I':5, 'MAGIC-II':6}})
except Exception:
assert False

try:
check_input_list({'mc_tel_ids':{'LST-1':1, 'LST-2':3, 'LST-3':0, 'LST-4':0, 'MAGIC-I':2, 'MAGIC-II':6}})
except Exception:
assert False

try:
check_input_list({'mc_tel_ids':{'LST-2':1, 'LST-1':3, 'LST-4':0, 'LST-3':0, 'MAGIC-II':2, 'MAGIC-I':6}})
except Exception:
assert False

check_input_list({'mc_tel_ids':{'LST-1':1, 'LST-2':2, 'LST-3':3, 'LST-4':4, 'MAGIC-I':5, 'MAGIC-II':6}})

check_input_list({'mc_tel_ids':{'LST-1':1, 'LST-2':3, 'LST-3':0, 'LST-4':0, 'MAGIC-I':2, 'MAGIC-II':6}})

check_input_list({'mc_tel_ids':{'LST-2':1, 'LST-1':3, 'LST-4':0, 'LST-3':0, 'MAGIC-II':2, 'MAGIC-I':6}})

with pytest.raises(
Exception,
match="Number of telescopes found in the configuration file is 5. It must be 6, i.e.: LST-1, LST-2, LST-3, LST-4, MAGIC-I, and MAGIC-II.",
Expand Down

0 comments on commit df96e74

Please sign in to comment.