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

Skip to content

Commit 5c18c09

Browse files
committed
TST: clear renderer cache in tests
Only on windows test_metrics_cache2 was starting with 2 renderers in the cache. Given that his is only happening on windows (and not osx/linux) on CI going with the assumption that these is something being held alive longer than we expect someplace else in the tests.
1 parent ae5af7f commit 5c18c09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/tests/test_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ def test_metrics_cache2():
918918
mpl.text._get_text_metrics_function
919919
).parameters['_cache'].default
920920
gc.collect()
921-
assert len(renderer_cache) == 0
921+
renderer_cache.clear()
922922

923923
def helper():
924924
fig, ax = plt.subplots()

0 commit comments

Comments
 (0)