(ax)
| 1023 | |
| 1024 | |
| 1025 | def test_lasso_set_props(ax): |
| 1026 | onselect = mock.Mock(spec=noop, return_value=None) |
| 1027 | tool = widgets.Lasso(ax, (100, 100), onselect) |
| 1028 | line = tool.line |
| 1029 | assert mcolors.same_color(line.get_color(), 'black') |
| 1030 | assert line.get_linestyle() == '-' |
| 1031 | assert line.get_lw() == 2 |
| 1032 | tool = widgets.Lasso(ax, (100, 100), onselect, props=dict( |
| 1033 | linestyle='-', color='darkblue', alpha=0.2, lw=1)) |
| 1034 | |
| 1035 | line = tool.line |
| 1036 | assert mcolors.same_color(line.get_color(), 'darkblue') |
| 1037 | assert line.get_alpha() == 0.2 |
| 1038 | assert line.get_lw() == 1 |
| 1039 | assert line.get_linestyle() == '-' |
| 1040 | line.set_color('r') |
| 1041 | line.set_alpha(0.3) |
| 1042 | assert mcolors.same_color(line.get_color(), 'r') |
| 1043 | assert line.get_alpha() == 0.3 |
| 1044 | |
| 1045 | |
| 1046 | def test_CheckButtons(ax): |
nothing calls this directly
no test coverage detected
searching dependent graphs…