Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 00829a6

Browse files
tacaswellQuLogic
andauthored
TST: simplify tests + comments
Co-authored-by: Elliott Sales de Andrade <[email protected]>
1 parent 8ee3adf commit 00829a6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/matplotlib/tests/test_figure.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -740,11 +740,11 @@ def test_figure_clear():
740740
subaxes = subfig.add_subplot(111)
741741
mainaxes = fig.add_subplot(gs[1])
742742

743-
# e.1) removing just the axis leaves the subplot
743+
# e.1) removing just the axes leaves the subplot
744744
mainaxes.remove()
745745
assert [subaxes] == fig.axes
746746

747-
# e.2) removing just the subaxis leaves the subplot
747+
# e.2) removing just the subaxes leaves the subplot
748748
# and subfigure
749749
mainaxes = fig.add_subplot(gs[1])
750750
subaxes.remove()
@@ -753,7 +753,8 @@ def test_figure_clear():
753753

754754
# e.3) clearing the subfigure leaves the subplot
755755
subaxes = subfig.add_subplot(111)
756-
assert all(ax in fig.axes for ax in [mainaxes, subaxes])
756+
assert mainaxes in fig.axes
757+
assert subaxes in fig.axes
757758
subfig.clear()
758759
assert subfig in fig.subfigs
759760
assert subaxes not in subfig.axes

0 commit comments

Comments
 (0)