Corrected test#3155
Merged
Merged
Conversation
radarhere
force-pushed
the
legacy_api_test
branch
2 times, most recently
from
June 5, 2018 10:58
f7ac555 to
3f3b56f
Compare
Member
|
Good spot, asserting against Should we also assert the exception message to be sure it's the right one? def test_set_legacy_api(self):
ifd = TiffImagePlugin.ImageFileDirectory_v2()
with self.assertRaises(Exception) as e:
ifd.legacy_api = None
self.assertEqual(str(e.exception),
"Not allowing setting of legacy api") |
radarhere
force-pushed
the
legacy_api_test
branch
from
June 6, 2018 12:34
3f3b56f to
5ef5a3c
Compare
Member
Author
|
Okay, sure, I've updated the commit with your code. |
Member
|
The AppVeyor failure is unrelated, I've created #3156 for that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of raising the
Exceptionat https://github.com/python-pillow/Pillow/blob/master/src/PIL/TiffImagePlugin.py#L484 as intended, this test was raising aNameErrorbecauseImageFileDirectory_v2is not imported.