Skip to content

Commit 6c5558e

Browse files
committed
Using absolute path for compass_data
1 parent 4f333f7 commit 6c5558e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/neutron_detection/test_compass.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import pytest
22
import numpy as np
3+
import os
34
from libra_toolbox.neutron_detection.activation_foils import compass
45

6+
TEST_DIR = os.path.dirname(__file__) # directory of this test file
7+
COMPASS_DATA_DIR = os.path.join(TEST_DIR, "compass_data")
8+
9+
510
@pytest.mark.parametrize("filename, expected_channel", [
611
("Data_CH14@V1725_292_Background_250322.CSV", 14),
712
("Data_CH7@V1725_123_Background_250322.CSV", 7),
@@ -14,7 +19,7 @@ def test_get_channel(filename, expected_channel):
1419
assert ch == expected_channel
1520

1621
@pytest.mark.parametrize("directory, expected_filenames",[
17-
("compass_data", {0:["Data_CH0@DT5730SB_Cs137_Problem_Waveform_1103.CSV",
22+
(COMPASS_DATA_DIR, {0:["Data_CH0@DT5730SB_Cs137_Problem_Waveform_1103.CSV",
1823
"Data_CH0@DT5730SB_Cs137_Problem_Waveform_1103_1.CSV"],
1924
1:["Data_CH1@V1725_Cs137_Normal_List_241107.CSV",
2025
"Data_CH1@V1725_Cs137_Normal_List_241107_1.CSV",

0 commit comments

Comments
 (0)