|
21 | 21 | parse_private_csa_header,
|
22 | 22 | )
|
23 | 23 |
|
24 |
| -from .utils import TESTS_DATA_PATH |
| 24 | +from .utils import TEST_DICOM_PATHS, TESTS_DATA_PATH |
25 | 25 |
|
26 | 26 | # Public: Private DICOM tags
|
27 | 27 | DICOM_FIELDS_TO_TEST = {"ProtocolName": "tProtocolName"}
|
@@ -180,26 +180,17 @@ def test_get_datetime_from_dcm_wo_dt() -> None:
|
180 | 180 | assert get_datetime_from_dcm(XA30_enhanced_dcm) is None
|
181 | 181 |
|
182 | 182 |
|
183 |
| -dicom_test_data = [ |
184 |
| - (dw.wrapper_from_file(d_file), [d_file], op.basename(d_file)) |
185 |
| - for d_file in glob(op.join(TESTS_DATA_PATH, "*.dcm")) |
186 |
| -] |
187 |
| - |
188 |
| - |
189 |
| -@pytest.mark.parametrize("mw,series_files,series_id", dicom_test_data) |
| 183 | +@pytest.mark.parametrize("dcmfile", TEST_DICOM_PATHS) |
190 | 184 | def test_create_seqinfo(
|
191 |
| - mw: dw.Wrapper, |
192 |
| - series_files: list[str], |
193 |
| - series_id: str, |
| 185 | + dcmfile: str, |
194 | 186 | ) -> None:
|
195 |
| - seqinfo = create_seqinfo(mw, series_files, series_id) |
196 |
| - assert seqinfo.sequence_name != "" |
197 |
| - pass |
198 |
| - |
| 187 | + mw = dw.wrapper_from_file(dcmfile) |
| 188 | + seqinfo = create_seqinfo(mw, [dcmfile], op.basename(dcmfile)) |
| 189 | + assert seqinfo.sequence_name |
199 | 190 |
|
200 |
| -def test_get_reproducible_int() -> None: |
201 |
| - dcmfile = op.join(TESTS_DATA_PATH, "phantom.dcm") |
202 | 191 |
|
| 192 | +@pytest.mark.parametrize("dcmfile", TEST_DICOM_PATHS) |
| 193 | +def test_get_reproducible_int(dcmfile: str) -> None: |
203 | 194 | assert type(get_reproducible_int([dcmfile])) is int
|
204 | 195 |
|
205 | 196 |
|
|
0 commit comments