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

Skip to content

Test framework cleanups #1056

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 2 commits into from
Aug 6, 2012
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
13 changes: 7 additions & 6 deletions lib/matplotlib/testing/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,13 @@ def comparable_formats():

def convert(filename, cache):
'''
Convert the named file into a png file.
Returns the name of the created file.
Convert the named file into a png file. Returns the name of the
created file.

If *cache* is True, the result of the conversion is cached in
`~/.matplotlib/test_cache/`. The caching is based on a hash of the
exact contents of the input file. The is no limit on the size of
the cache, so it may need to be manually cleared periodically.
'''
base, extension = filename.rsplit('.', 1)
if extension not in converter:
Expand Down Expand Up @@ -278,10 +283,6 @@ def compare_images( expected, actual, tol, in_decorator=False ):

actualImage, expectedImage = crop_to_same(actual, actualImage, expected, expectedImage)

# normalize the images
# expectedImage = image_util.autocontrast( expectedImage, 2 )
# actualImage = image_util.autocontrast( actualImage, 2 )

# compare the resulting image histogram functions
expected_version = version.LooseVersion("1.6")
found_version = version.LooseVersion(np.__version__)
Expand Down