()
| 56 | |
| 57 | |
| 58 | def test_piecontainer_remove(): |
| 59 | fig, ax = plt.subplots() |
| 60 | pie = ax.pie([2, 3], labels=['foo', 'bar'], autopct="%1.0f%%") |
| 61 | ax.pie_label(pie, ['baz', 'qux']) |
| 62 | assert len(ax.patches) == 2 |
| 63 | assert len(ax.texts) == 6 |
| 64 | |
| 65 | pie.remove() |
| 66 | assert not ax.patches |
| 67 | assert not ax.texts |
| 68 | |
| 69 | |
| 70 | def test_piecontainer_unpack_backcompat(): |