Testing of interactive functions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
jni
Reply | Threaded
Open this post in threaded view
|

Testing of interactive functions

jni
Hello,

We just got an exciting PR in scikit-image to do manual image segmentation with matplotlib:
https://github.com/scikit-image/scikit-image/pull/2584

The manual_lasso_segmentation function in particular is astoundingly simple — a testament to the ease of use of the mpl interactive bindings. Thanks!

Because it relies on interactive clicking and click-and-dragging after a blocking call to plt.show(block=True), though, it’s tricky if not impossible to test. I’m wondering whether mpl has a testing framework for the interactive components?

Juan.

PS: Also, the layout of the undo button is a bit tricky… If you have any tips for that, we are all ears! =)


_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Testing of interactive functions

tcaswell
See https://github.com/matplotlib/matplotlib/pull/8403 for one way to test interactivity.

On Thu, Apr 13, 2017 at 4:53 AM Juan Nunez-Iglesias <[hidden email]> wrote:
Hello,

We just got an exciting PR in scikit-image to do manual image segmentation with matplotlib:

The manual_lasso_segmentation function in particular is astoundingly simple — a testament to the ease of use of the mpl interactive bindings. Thanks!

Because it relies on interactive clicking and click-and-dragging after a blocking call to plt.show(block=True), though, it’s tricky if not impossible to test. I’m wondering whether mpl has a testing framework for the interactive components?

Juan.

PS: Also, the layout of the undo button is a bit tricky… If you have any tips for that, we are all ears! =)

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Testing of interactive functions

Benjamin Root
Here is something I did several years ago to have reproducible interactivity for testing purposes. It was limited to GTK, and there are probably better ways to do it now, but it is something.

http://matplotlib.1069221.n5.nabble.com/scripting-interaction-td28629.html

Cheers!
Ben Root


On Thu, Apr 13, 2017 at 9:11 AM, Thomas Caswell <[hidden email]> wrote:
See https://github.com/matplotlib/matplotlib/pull/8403 for one way to test interactivity.

On Thu, Apr 13, 2017 at 4:53 AM Juan Nunez-Iglesias <[hidden email]> wrote:
Hello,

We just got an exciting PR in scikit-image to do manual image segmentation with matplotlib:

The manual_lasso_segmentation function in particular is astoundingly simple — a testament to the ease of use of the mpl interactive bindings. Thanks!

Because it relies on interactive clicking and click-and-dragging after a blocking call to plt.show(block=True), though, it’s tricky if not impossible to test. I’m wondering whether mpl has a testing framework for the interactive components?

Juan.

PS: Also, the layout of the undo button is a bit tricky… If you have any tips for that, we are all ears! =)

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users



_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users