Skip to content

Commit 394e1ae

Browse files
committed
test_get_point: fixed vanishing marker
1 parent 36a1bc5 commit 394e1ae

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

plotpy/tests/tools/test_get_point.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def get_point(*args):
3636
SelectPointTool,
3737
title="Test",
3838
on_active_item=True,
39-
mode="create",
39+
mode="reuse",
4040
end_callback=callback_function,
4141
)
4242
default.activate()
@@ -45,16 +45,17 @@ def get_point(*args):
4545
item = make.mcurve(cx, cy)
4646
plot.add_item(item)
4747
plot.set_active_item(item)
48+
plot.unselect_item(item)
4849
win.show()
4950
return win, default.get_coordinates()
5051

5152

5253
def test_get_point():
5354
"""Test"""
5455
with qt_app_context(exec_loop=True):
55-
x = linspace(-10, 10, 1000)
56-
y = sin(sin(sin(x)))
57-
x2 = linspace(-10, 10, 20)
56+
x = linspace(-10, 10, 500)
57+
y = 0.25 * sin(sin(sin(x * 0.5)))
58+
x2 = linspace(-10, 10, 200)
5859
y2 = sin(sin(sin(x2)))
5960
_persist_dialog, coordinates = get_point((x, y), (x2, y2), (x, sin(2 * y)))
6061
print(coordinates)

0 commit comments

Comments
 (0)