MCPcopy Create free account
hub / github.com/SimpleITK/SimpleITK / test_data

Function test_data

Wrapping/Python/tests/sitkFlatStaticMethod.py:24–31  ·  view source on GitHub ↗

Create a test directory with a DICOM file for testing.

(tmp_path)

Source from the content-addressed store, hash-verified

22
23@pytest.fixture
24def test_data(tmp_path):
25 """Create a test directory with a DICOM file for testing."""
26 img = sitk.Image([10, 10], sitk.sitkInt16)
27 test_dcm_file = tmp_path / "test.dcm"
28 sitk.WriteImage(img, test_dcm_file)
29
30 # Return a dictionary with the test data
31 return {"test_dir": tmp_path, "test_dcm_file": test_dcm_file}
32
33def test_ProcessObject():
34 sitk.ProcessObject_GlobalDefaultDebugOff()

Callers

nothing calls this directly

Calls 1

ImageMethod · 0.80

Tested by

no test coverage detected