77
88from ctapipe .core import run_tool
99from ctapipe .utils import get_dataset_path
10- from ctapipe .utils .filelock import FileLock
1110
1211@pytest .fixture (scope = "session" )
1312def prod5_gamma_simtel_path ():
@@ -32,19 +31,14 @@ def dl1_gamma_file(dl1_tmp_path, prod5_gamma_simtel_path):
3231
3332 output = dl1_tmp_path / "gamma.dl1.h5"
3433
35- # prevent running process multiple times in case of parallel tests
36- with FileLock (output .with_suffix (output .suffix + ".lock" )):
37- if output .is_file ():
38- return output
39-
40- argv = [
41- f"--input={ prod5_gamma_simtel_path } " ,
42- f"--output={ output } " ,
43- "--write-images" ,
44- "--DataWriter.Contact.name=αℓℓ the äüöß" ,
45- ]
46- assert run_tool (ProcessorTool (), argv = argv , cwd = dl1_tmp_path ) == 0
47- return output
34+ argv = [
35+ f"--input={ prod5_gamma_simtel_path } " ,
36+ f"--output={ output } " ,
37+ "--write-images" ,
38+ "--DataWriter.Contact.name=αℓℓ the äüöß" ,
39+ ]
40+ assert run_tool (ProcessorTool (), argv = argv , cwd = dl1_tmp_path ) == 0
41+ return output
4842
4943@pytest .fixture (scope = "session" )
5044def r1_gamma_file (r1_tmp_path , prod5_gamma_simtel_path ):
@@ -55,16 +49,11 @@ def r1_gamma_file(r1_tmp_path, prod5_gamma_simtel_path):
5549
5650 output = r1_tmp_path / "gamma.r1.h5"
5751
58- # prevent running process multiple times in case of parallel tests
59- with FileLock (output .with_suffix (output .suffix + ".lock" )):
60- if output .is_file ():
61- return output
62-
63- argv = [
64- f"--input={ prod5_gamma_simtel_path } " ,
65- f"--output={ output } " ,
66- f"--DataWriter.write_r1_waveforms=True" ,
67- "--DataWriter.Contact.name=αℓℓ the äüöß" ,
68- ]
69- assert run_tool (ProcessorTool (), argv = argv , cwd = r1_tmp_path ) == 0
70- return output
52+ argv = [
53+ f"--input={ prod5_gamma_simtel_path } " ,
54+ f"--output={ output } " ,
55+ f"--DataWriter.write_r1_waveforms=True" ,
56+ "--DataWriter.Contact.name=αℓℓ the äüöß" ,
57+ ]
58+ assert run_tool (ProcessorTool (), argv = argv , cwd = r1_tmp_path ) == 0
59+ return output
0 commit comments