Skip to content

Commit

Permalink
Update test_coincidence.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Elisa-Visentin authored Oct 20, 2023
1 parent 85b393f commit 6e083f0
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions magicctapipe/scripts/lst1_magic/tests/test_coincidence.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import subprocess
import pytest
import glob


Expand All @@ -9,7 +8,7 @@ def test_coincidence_preoffset(dl1_lst, merge_magic, temp_coinc_preoff, config_p
"""

for file in dl1_lst:
out = subprocess.run(
_ = subprocess.run(
[
"lst1_magic_event_coincidence",
f"-l{str(file)}",
Expand All @@ -18,11 +17,7 @@ def test_coincidence_preoffset(dl1_lst, merge_magic, temp_coinc_preoff, config_p
f"-c{str(config_preoff)}",
]
)
if out.returncode != 0:
raise ValueError(
f"Coincidence script with pre-offset option failed with return code {out.returncode} for file {file}"
)


assert len(glob.glob(f"{temp_coinc_preoff}/*.h5"))==1


Expand All @@ -32,7 +27,7 @@ def test_coincidence(dl1_lst, merge_magic, temp_coinc, config):
"""

for file in dl1_lst:
out = subprocess.run(
_ = subprocess.run(
[
"lst1_magic_event_coincidence",
f"-l{str(file)}",
Expand All @@ -41,11 +36,7 @@ def test_coincidence(dl1_lst, merge_magic, temp_coinc, config):
f"-c{str(config)}",
]
)
if out.returncode != 0:
raise ValueError(
f"Coincidence script failed with return code {out.returncode} for file {file}"
)


assert len(glob.glob(f"{temp_coinc}/*.h5"))==1


Expand Down

0 comments on commit 6e083f0

Please sign in to comment.