Skip to content

TST: Relax tolerances in test_bbox_size on Freetype version mismatch - #11022

Merged
Cadair merged 1 commit into
astropy:masterfrom
dhomeier:bbox-check-freetype
Nov 11, 2020
Merged

Cadair merged 1 commit into
astropy:masterfrom
dhomeier:bbox-check-freetype

Conversation

@dhomeier

@dhomeier dhomeier commented Nov 10, 2020 •

Copy link
Copy Markdown
Contributor

Description

Checks for Freetype library Matplotlib is linked against; if this is not the reference version 2.6.1 which Matplotlib mandates for its own tests to reproduce exact comparison images, allow test_bbox_size to check the bounding box extent with relaxed tolerance.

Fixes #11007

This combines several possible approaches to the problem: assuming the failure on Debian is related to its Freetype 2.10, run the test once with wider tolerance and allow it to fail on the stricter comparison. We may only need one of these – assuming the test as introduced by @dstansby in #10797 should assure that the plot fits comfortably within the tightbbox, atol of 0.1 – 0.2 pt would certainly be always acceptable.

@pllim pllim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I know enough about the intent of this test to review, so I'll have to defer to others.

@dstansby dstansby left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a reasonable approach to take

@pllim pllim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @dstansby ! I'll approve to remove merge block but will leave it open in case others want to review. @dhomeier , feel free to merge if no one objects after a few days?

@dhomeier

Copy link
Copy Markdown
Contributor Author

OK, thanks for reviewing – ideally @olebole would test the patch with the Debian build to confirm it actually fixes the failure, but at least it should not break anything!

@olebole olebole left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that this patch removes the error on Debian. It now builds nicely, thank you!

@Cadair
Cadair merged commit 701ed7b into astropy:master Nov 11, 2020
@dhomeier
dhomeier deleted the bbox-check-freetype branch November 11, 2020 17:24
bsipocz pushed a commit that referenced this pull request Nov 23, 2020
TST: Relax tolerances in test_bbox_size on Freetype version mismatch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[4.2rc1] test_bbox_size failure with Python 3.8/3.9

6 participants