()
| 6797 | |
| 6798 | |
| 6799 | def test_pie_textprops(): |
| 6800 | data = [23, 34, 45] |
| 6801 | labels = ["Long name 1", "Long name 2", "Long name 3"] |
| 6802 | |
| 6803 | textprops = dict(horizontalalignment="center", |
| 6804 | verticalalignment="top", |
| 6805 | rotation=90, |
| 6806 | rotation_mode="anchor", |
| 6807 | size=12, color="red") |
| 6808 | |
| 6809 | _, texts, autopct = plt.gca().pie(data, labels=labels, autopct='%.2f', |
| 6810 | textprops=textprops) |
| 6811 | for labels in [texts, autopct]: |
| 6812 | for tx in labels: |
| 6813 | assert tx.get_ha() == textprops["horizontalalignment"] |
| 6814 | assert tx.get_va() == textprops["verticalalignment"] |
| 6815 | assert tx.get_rotation() == textprops["rotation"] |
| 6816 | assert tx.get_rotation_mode() == textprops["rotation_mode"] |
| 6817 | assert tx.get_size() == textprops["size"] |
| 6818 | assert tx.get_color() == textprops["color"] |
| 6819 | |
| 6820 | |
| 6821 | def test_pie_get_negative_values(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…