Skip to content

RFC: Display differences#2862

Merged
wiredfool merged 2 commits intopython-pillow:masterfrom
wiredfool:difference-upload
Dec 9, 2017
Merged

RFC: Display differences#2862
wiredfool merged 2 commits intopython-pillow:masterfrom
wiredfool:difference-upload

Conversation

@wiredfool
Copy link
Copy Markdown
Member

I've been thinking about something like this since we had the issue that was non-reproducable on any of my machines.

What this does is push all test failures for assert_image_equal and assert_image_similar to a webservice, where it displays those images and the difference.

======================================================================

FAIL: TestUploader.test_upload_equal

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/home/travis/build/wiredfool/Pillow/Tests/test_uploader.py", line 10, in test_upload_equal

    self.assert_image_equal(result, target)

  File "/home/travis/build/wiredfool/Pillow/Tests/helper.py", line 104, in assert_image_equal

    self.fail(msg or "got different content")

AssertionError: got different content

-------------------- >> begin captured logging << --------------------

urllib3.connectionpool: DEBUG: Starting new HTTPS connection (1): fmuvehxed0.execute-api.us-east-2.amazonaws.com

urllib3.connectionpool: DEBUG: https://fmuvehxed0.execute-api.us-east-2.amazonaws.com:443 "GET /prod/upload HTTP/1.1" 200 3421

urllib3.connectionpool: DEBUG: Starting new HTTPS connection (1): s3.us-east-2.amazonaws.com

urllib3.connectionpool: DEBUG: https://s3.us-east-2.amazonaws.com:443 "POST /pillow-test-image-results HTTP/1.1" 204 0

urllib3.connectionpool: DEBUG: Starting new HTTPS connection (1): s3.us-east-2.amazonaws.com

urllib3.connectionpool: DEBUG: https://s3.us-east-2.amazonaws.com:443 "POST /pillow-test-image-results HTTP/1.1" 204 0

helper: ERROR: Url for test images: https://fmuvehxed0.execute-api.us-east-2.amazonaws.com/prod/show/1510948233.21/

--------------------- >> end captured logging << ---------------------

I'm not 100% on the output yet, and we're still not going to trigger on some forms of errors.

Comments?

@hugovk
Copy link
Copy Markdown
Member

hugovk commented Nov 17, 2017

Sounds like a good idea.

@wiredfool wiredfool merged commit dcb8d6f into python-pillow:master Dec 9, 2017
@wiredfool wiredfool deleted the difference-upload branch January 8, 2018 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants