MCPcopy
hub / github.com/pydata/xarray / figure_context

Function figure_context

xarray/tests/test_plot.py:58–64  ·  view source on GitHub ↗

context manager which autocloses a figure (even if the test failed)

(*args, **kwargs)

Source from the content-addressed store, hash-verified

56
57@contextlib.contextmanager
58def figure_context(*args, **kwargs):
59 """context manager which autocloses a figure (even if the test failed)"""
60
61 try:
62 yield None
63 finally:
64 plt.close("all")
65
66
67@pytest.fixture(autouse=True)

Callers 15

test_quiverMethod · 0.85
test_facetgridMethod · 0.85
test_streamlineMethod · 0.85
test_facetgridMethod · 0.85
test_xincrease_kwargMethod · 0.85
test_yincrease_kwargMethod · 0.85
test_xscale_kwargMethod · 0.85
test_yscale_kwargMethod · 0.85
test_xscale_log_kwargMethod · 0.85
test_yscale_log_kwargMethod · 0.85

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…