8000 MAINT: Deterministic SVG and PDF tests by jkseppan · Pull Request #7748 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

MAINT: Deterministic SVG and PDF tests #7748

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

Merged
merged 7 commits into from
Jan 21, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reproducible svg
  • Loading branch information
jkseppan committed Jan 5, 2017
commit 93b2eea116e9ee51266823142b541bc671cb3d0a
5 changes: 5 additions & 0 deletions lib/matplotlib/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ def set_font_settings_for_testing():
rcParams['text.hinting_factor'] = 8


def set_reproducibility_for_testing():
rcParams['svg.hashsalt'] = 'matplotlib'
Copy link
Member

Choose a reason for hiding this comment

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

This will also break, in a way, the determinism test.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you explain in more detail? The _test_determinism_save function in test_backend_svg.py file also sets this rc parameter to a constant value.

Copy link
Member

Choose a reason for hiding this comment

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

Probably along the same lines as @tacaswell; I was thinking it wouldn't fail if svg.hashsalt was broken. However, I see this test doesn't use the decorator anyway, so it is likely to still fail correctly.



def setup():
# The baseline images are created in this locale, so we should use
# it during all of the tests.
Expand All @@ -161,3 +165,4 @@ def setup():
rcdefaults() # Start with all defaults

set_font_settings_for_testing()
set_reproducibility_for_testing()
0