Skip to content

Commit

Permalink
Merge pull request #409 from pymedphys/Debug-DICOM-anonymise-test-fai…
Browse files Browse the repository at this point in the history
…lure

[MRG] Str(e) to str(e.value)
  • Loading branch information
pchlap committed Jul 1, 2019
2 parents 5333e4b + 05caf97 commit a37cee0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/user/examples/index.rst
Expand Up @@ -21,6 +21,7 @@ library usage.

trf_mudensity
gamma_from_dicom
pinnacle_export



4 changes: 2 additions & 2 deletions packages/pymedphys_dicom/tests/test_anonymise.py
Expand Up @@ -140,7 +140,7 @@ def test_anonymise_dataset_and_all_is_anonymised_functions():

with pytest.raises(ValueError) as e_info:
anonymise_dataset(ds)
assert str(e_info).count("At least one of the non-private tags "
assert str(e_info.value).count("At least one of the non-private tags "
"within your DICOM file is not within "
"PyMedPhys's copy of the DICOM dictionary.")

Expand All @@ -150,7 +150,7 @@ def test_anonymise_dataset_and_all_is_anonymised_functions():
anon_is_expected=True)
with pytest.raises(AttributeError) as e_info:
ds_anon_delete_unknown.PatientName
assert str(e_info).count("'Dataset' object has no attribute "
assert str(e_info.value).count("'Dataset' object has no attribute "
"'PatientName'")

ds_anon_ignore_unknown = anonymise_dataset(ds,
Expand Down

0 comments on commit a37cee0

Please sign in to comment.