Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Default interpolation #5438

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

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
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
Make classic testing work correctly
Fix failures in #5416
  • Loading branch information
mdboom committed Nov 8, 2015
commit dd29b94a1c7342b280fbdea8ed9f41a6cdff7da0
7 changes: 3 additions & 4 deletions lib/matplotlib/testing/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from matplotlib import ticker
from matplotlib import pyplot as plt
from matplotlib import ft2font
from matplotlib import rcParams
from matplotlib.testing.noseclasses import KnownFailureTest, \
KnownFailureDidNotFailTest, ImageComparisonFailure
from matplotlib.testing.compare import comparable_formats, compare_images, \
Expand Down Expand Up @@ -138,6 +139,7 @@ def check_freetype_version(ver):
class ImageComparisonTest(CleanupTest):
@classmethod
def setup_class(cls):
CleanupTest.setup_class()
cls._initial_settings = mpl.rcParams.copy()
try:
matplotlib.style.use(cls._style)
Expand All @@ -146,11 +148,8 @@ def setup_class(cls):
mpl.rcParams.clear()
mpl.rcParams.update(cls._initial_settings)
raise
# Because the setup of a CleanupTest might involve
# modifying a few rcparams, this setup should come
# last prior to running the image test.
CleanupTest.setup_class()
cls.original_settings = cls._initial_settings
matplotlib.tests.set_font_settings_for_testing()
cls._func()

@classmethod
Expand Down
11 changes: 8 additions & 3 deletions lib/matplotlib/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
'test data.')


def set_font_settings_for_testing():
rcParams['font.family'] = 'DejaVu Sans'
rcParams['text.hinting'] = False
rcParams['text.hinting_factor'] = 8


def setup():
# The baseline images are created in this locale, so we should use
# it during all of the tests.
Expand All @@ -45,9 +51,8 @@ def setup():
# tests and are not necessarily the default values as specified in
# rcsetup.py
rcdefaults() # Start with all defaults
rcParams['font.family'] = 'DejaVu Sans'
rcParams['text.hinting'] = False
rcParams['text.hinting_factor'] = 8

set_font_settings_for_testing()


def assert_str_equal(reference_str, test_str,
Expand Down