MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / helper

Function helper

lib/matplotlib/tests/test_text.py:887–898  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

885 renderer_cache.clear()
886
887 def helper():
888 fig, ax = plt.subplots()
889 fig.draw_without_rendering()
890 # show we hit the outer cache
891 assert len(renderer_cache) == 1
892 func = renderer_cache[fig.canvas.get_renderer()]
893 cache_info = func.cache_info()
894 # show we hit the inner cache
895 assert cache_info.currsize > 0
896 assert cache_info.currsize == cache_info.misses
897 assert cache_info.hits > cache_info.misses
898 plt.close(fig)
899
900 helper()
901 gc.collect()

Callers 1

test_metrics_cache2Function · 0.85

Calls 4

subplotsMethod · 0.45
get_rendererMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…