Skip to content
New issue

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

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

Already on GitHub? # to your account

Add PDF comparisons to improve testing #3

Open
asgrim opened this issue Jan 28, 2021 · 3 comments
Open

Add PDF comparisons to improve testing #3

asgrim opened this issue Jan 28, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@asgrim
Copy link
Member

asgrim commented Jan 28, 2021

At the moment we just assert the PDF is generated. We should also do a visual comparison to check the output matches. Note, just doing a binary diff is not sufficient, since the content DOES change every time (even if it is only /CreationDate etc.)

Might be worth taking a look at rst2pdf technique https://github.com/rst2pdf/rst2pdf/blob/master/rst2pdf/tests/compare_pdf.sh for PDF comparison

@asgrim asgrim added the enhancement New feature or request label Jan 28, 2021
@ciaranmcnulty
Copy link
Collaborator

I wonder if content-length is stable

@Ocramius
Copy link
Member

Ocramius commented Oct 8, 2021

unlikely: could have something as trivial as the name/version of the software generating the PDF baked into it, and it would break.

Visual diffing is something we've done in the past, and it's fairly OK.

@ciaranmcnulty
Copy link
Collaborator

The name/version of the software is baked into the image! I guess dates are in there

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants