8000 Fix randomly failing tests by mdboom · Pull Request #2437 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fix randomly failing tests #2437

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 1 commit into from
Sep 19, 2013
Merged
Changes from all commits
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
11 changes: 10 additions & 1 deletion lib/matplotlib/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

import difflib

from matplotlib import rcParams, rcdefaults, use


_multiprocess_can_split_ = True

Expand All @@ -12,6 +14,7 @@ def setup():
# it during all of the tests.
import locale
import warnings
from matplotlib.backends import backend_agg, backend_pdf, backend_svg

try:
locale.setlocale(locale.LC_ALL, str('en_US.UTF-8'))
Expand All @@ -28,11 +31,17 @@ def setup():
# These settings *must* be hardcoded for running the comparison
# tests and are not necessarily the default values as specified in
# rcsetup.py
rcdefaults() # Start with all defaults
rcdefaults() # Start with all defaults
rcParams['font.family'] = 'Bitstream Vera Sans'
rcParams['text.hinting'] = False
rcParams['text.hinting_factor'] = 8

# Clear the font caches. Otherwise, the hinting mode can travel
# from one test to another.
backend_agg.RendererAgg._fontd.clear()
backend_pdf.RendererPdf.truetype_font_cache.clear()
backend_svg.RendererSVG.fontd.clear()


def assert_str_equal(reference_str, test_str,
format_str='String {str1} and {str2} do not match:\n{differences}'):
Expand Down
0