8000 Merge pull request #1056 from mdboom/test-cleanups · matplotlib/matplotlib@1e5e687 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e5e687

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

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/matplotlib/testing/compare.py

Lines 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