Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1e5e687

Browse filesBrowse files
committed
Merge pull request #1056 from mdboom/test-cleanups
Test framework cleanups
2 parents 1456f05 + 9229a5c commit 1e5e687
Copy full SHA for 1e5e687

File tree

Expand file treeCollapse file tree

1 file changed

+7
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-6
lines changed

‎lib/matplotlib/testing/compare.py

Copy file name to clipboardExpand all lines: lib/matplotlib/testing/compare.py
+7-6Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,13 @@ def comparable_formats():
174174

175175
def convert(filename, cache):
176176
'''
177-
Convert the named file into a png file.
178-
Returns the name of the created file.
177+
Convert the named file into a png file. Returns the name of the
178+
created file.
179+
180+
If *cache* is True, the result of the conversion is cached in
181+
`~/.matplotlib/test_cache/`. The caching is based on a hash of the
182+
exact contents of the input file. The is no limit on the size of
183+
the cache, so it may need to be manually cleared periodically.
179184
'''
180185
base, extension = filename.rsplit('.', 1)
181186
if extension not in converter:
@@ -278,10 +283,6 @@ def compare_images( expected, actual, tol, in_decorator=False ):
278283

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

281-
# normalize the images
282-
# expectedImage = image_util.autocontrast( expectedImage, 2 )
283-
# actualImage = image_util.autocontrast( actualImage, 2 )
284-
285286
# compare the resulting image histogram functions
286287
expected_version = version.LooseVersion("1.6")
287288
found_version = version.LooseVersion(np.__version__)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.