Skip to content

Commit

Permalink
Renaming test and removing redundancy in unit test for dicom image re…
Browse files Browse the repository at this point in the history
…dactor
  • Loading branch information
niwilso committed Jul 13, 2023
1 parent b54cd15 commit e145763
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1174,16 +1174,12 @@ def test_add_redact_box_happy_path(
)
def test_DicomImageRedactorEngine_redact_and_return_bbox(
mocker,
mock_engine: DicomImageRedactorEngine,
dcm_path: str,
):
"""Test happy path for DicomImageRedactorEngine redact_and_return_bbox()
Args:
mock_engine (DicomImageRedactorEngine): DicomImageRedactorEngine object.
dcm_path (str): Path to input DICOM file or dir.
output_dir (str): Path to parent directory to write output to.
overwrite (bool): True if overwriting original files.
"""
# Arrange
test_image = pydicom.dcmread(dcm_path)
Expand Down Expand Up @@ -1300,26 +1296,21 @@ def test_DicomImageRedactorEngine_redact_and_return_bbox_exceptions(
@pytest.mark.parametrize(
"dcm_path",
[
(Path(TEST_DICOM_PARENT_DIR, "0_ORIGINAL.dcm")),
(Path(TEST_DICOM_PARENT_DIR, "0_ORIGINAL.dcm")),
(Path(TEST_DICOM_PARENT_DIR, "RGB_ORIGINAL.dcm")),
(Path(TEST_DICOM_DIR_2, "1_ORIGINAL.DCM")),
(Path(TEST_DICOM_DIR_2, "2_ORIGINAL.dicom")),
(Path(TEST_DICOM_DIR_3, "3_ORIGINAL.DICOM")),
],
)
def test_DicomImageRedactorEngine_happy_path(
def test_DicomImageRedactorEngine_redact_happy_path(
mocker,
mock_engine: DicomImageRedactorEngine,
dcm_path: str,
):
"""Test happy path for DicomImageRedactorEngine redact()
Args:
mock_engine (DicomImageRedactorEngine): DicomImageRedactorEngine object.
dcm_path (str): Path to input DICOM file or dir.
output_dir (str): Path to parent directory to write output to.
overwrite (bool): True if overwriting original files.
"""
# Arrange
test_image = pydicom.dcmread(dcm_path)
Expand Down

0 comments on commit e145763

Please sign in to comment.