Closed eort closed 9 months ago
Sure, sorry. Will do!
Do you have actually some automated test battery of sorts? In this particular case with the mouse buttons, testing it is rather easy, but for bigger changes I imagine it to be quite tricky to oversee all the effects of new code, especially considering different setups, etc.
Thanks for the update!
Do you have actually some automated test battery of sorts? In this particular case with the mouse buttons, testing it is rather easy, but for bigger changes I imagine it to be quite tricky to oversee all the effects of new code, especially considering different setups, etc.
Partly. There are test cases (unittests) included with the source code which you can run with pytest
. However, these only test those aspects of the code that don't require user interaction, such as parsing of OpenSesame script. Of course a lot of the functionality is about user interaction so the unittests are far from comprehensive.
It is possible to write unittests for interactions too. But that's tricky and I never got around to doing that.
All mouse events (left/right/middle click, as well as turning the wheel and what not is currently triggering mouse events. This PR limits it to left/right/middle clicks by hard coding it.
I couldn't see a benefit of making it a parameter. But maybe, we could restrict it even more? Like only left-clicks?