@pytest.mark.parametrize('backend', [pytest.param('Qt4Agg', marks=pytest.mark.backend('Qt4Agg')), pytest.param('Qt5Agg', marks=pytest.mark.backend('Qt5Agg'))])
def test_fig_close(backend):
    init_figs = copy.copy(Gcf.figs)
    fig = plt.figure()
    fig.canvas.manager.window.close()
    assert (init_figs == Gcf.figs)
@pytest.mark.parametrize('backend', [pytest.param('Qt4Agg', marks=pytest.mark.backend('Qt4Agg')), pytest.param('Qt5Agg', marks=pytest.mark.backend('Qt5Agg'))])
def test_fig_close(backend):
    init_figs = copy.copy(Gcf.figs)
    fig = plt.figure()
    fig.canvas.manager.window.close()
    assert (init_figs == Gcf.figs)