Skip to content

Commit

Permalink
add test dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Zehvogel committed Oct 20, 2023
1 parent 8dc6054 commit 35ef449
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/test_CLDConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import os
import subprocess
from decorator import decorator
import pytest

@decorator
def _CLDConfig(test_fun):
Expand All @@ -29,27 +30,31 @@ def _CLDConfig(test_fun):
detectorModel = os.path.join(os.environ["K4GEO"], "FCCee/CLD/compact/FCCee_o1_v04/FCCee_o1_v04.xml")

@_CLDConfig
@pytest.mark.dependency()
def test_ddsim_lcio():
command = "ddsim -S cld_steer.py -N 3 --inputFile ../test/yyxyev_000.stdhep --outputFile test.slcio".split()
command.extend(["--compactFile", detectorModel])
res = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
assert res.returncode == 0, res.stdout

@_CLDConfig
@pytest.mark.dependency()
def test_ddsim_edm4hep():
command = "ddsim -S cld_steer.py -N 3 --inputFile ../test/yyxyev_000.stdhep --outputFile test.edm4hep.root".split()
command.extend(["--compactFile", detectorModel])
res = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
assert res.returncode == 0, res.stdout

@_CLDConfig
@pytest.mark.dependency(depends=["test_ddsim_lcio"])
def test_lcio_input():
command = "k4run --inputFiles=test.slcio --outputBasename=rec_test_lcio CLDReconstruction.py".split()
command.extend(["--GeoSvc.detectors", detectorModel])
res = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
assert res.returncode == 0, res.stdout

@_CLDConfig
@pytest.mark.dependency(depends=["test_ddsim_edm4hep"])
def test_edm4hep_input():
command = "k4run --inputFiles=test.edm4hep.root --outputBasename=rec_test_edm4hep CLDReconstruction.py".split()
command.extend(["--GeoSvc.detectors", detectorModel])
Expand Down

0 comments on commit 35ef449

Please sign in to comment.