Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0f682d commit a3a4957Copy full SHA for a3a4957
lib/matplotlib/tests/test_pyplot.py
@@ -429,3 +429,18 @@ def test_minor_ticks():
429
tick_labels = ax.get_yticklabels(minor=True)
430
assert np.all(tick_pos == np.array([3.5, 6.5]))
431
assert [l.get_text() for l in tick_labels] == ['a', 'b']
432
+
433
434
+def figure_hook_example(figure):
435
+ figure._test_was_here = True
436
437
438
+def test_figure_hook():
439
440
+ test_rc = {
441
+ 'figure.hooks': ['matplotlib.tests.test_pyplot:figure_hook_example']
442
+ }
443
+ with mpl.rc_context(test_rc):
444
+ fig = plt.figure()
445
446
+ assert fig._test_was_here
0 commit comments