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

Function test_quiver_key_memory_leak

lib/matplotlib/tests/test_quiver.py:39–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37@pytest.mark.skipif(platform.python_implementation() != 'CPython',
38 reason='Requires CPython')
39def test_quiver_key_memory_leak():
40 fig, ax = plt.subplots()
41
42 Q = draw_quiver(ax)
43
44 qk = ax.quiverkey(Q, 0.5, 0.92, 2, r'$2 \frac{m}{s}$',
45 labelpos='W',
46 fontproperties={'weight': 'bold'})
47 orig_refcount = sys.getrefcount(qk)
48 qk.remove()
49 assert sys.getrefcount(qk) < orig_refcount
50
51
52def test_quiver_number_of_args():

Callers

nothing calls this directly

Calls 4

draw_quiverFunction · 0.85
quiverkeyMethod · 0.80
subplotsMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…