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

Conversation

Matthew-Jennings
Copy link
Member

No description provided.

@SimonBiggs
Copy link
Member

SimonBiggs commented Jul 1, 2019

I feel bad for taking you away from your holiday...

@SimonBiggs
Copy link
Member

SimonBiggs commented Jul 1, 2019

I still don't get what caused this... Maybe you can fill me in when we manage to catch each other on the phone :).

Oh? A breaking change in pytest? We may need to pin pytest >= the current version of that's the case, as that doesn't look backwards compatible.

@SimonBiggs
Copy link
Member

There we go, that's the difference:

pytest version 5.0.0:

Changelog:

https://docs.pytest.org/en/latest/changelog.html#removals

Relevant issue:

pytest-dev/pytest#5412

@SimonBiggs
Copy link
Member

SimonBiggs commented Jul 1, 2019

@pchlap, @Matthew-Jennings has fixed this issue. It was due to an upgrade in pytest to 5.0.0. see the above comment. This can now be merged into your branch.

@Matthew-Jennings
Copy link
Member Author

Yeah, I was thinking it had to be an update to a dependency. I was actually thinking Python itself, but hadn’t gotten around to checking the logs between passing and failing tests to interrogate package versions! Anyway, nice find :)

@SimonBiggs
Copy link
Member

Oh? You didn't find that? How did you fix it without finding that?

@SimonBiggs
Copy link
Member

Ahh, your prints :)

@Matthew-Jennings
Copy link
Member Author

Matthew-Jennings commented Jul 1, 2019

I re-checked the pytest.raises() example code and noticed it had changed from asserting x in str(excinfo) to asserting x in str(excinfo.value). But I’d seen examples of the former before, so I printed away, haha.

I hadn’t made the leap to recognising pytest had updated, I’d actually thought it was Python itself. I’d mistakenly thought excinfo Referred to Python Exception info, but now I see that was silly, it’s actually part of pytest.

@Matthew-Jennings Matthew-Jennings changed the title Str(e) to str(e.value) [MRG] Str(e) to str(e.value) Jul 1, 2019
@SimonBiggs
Copy link
Member

I'll let @pchlap do the merge given it's his branch

@pchlap pchlap merged commit a37cee0 into pc-pinnacle-export Jul 1, 2019
@Matthew-Jennings Matthew-Jennings deleted the Debug-DICOM-anonymise-test-failure branch July 28, 2019 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants