Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] Str(e) to str(e.value) #409

Merged
merged 2 commits into from Jul 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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