pyapp-kit / superqt

Missing widgets and components for Qt-python
https://pyapp-kit.github.io/superqt/
BSD 3-Clause "New" or "Revised" License
210 stars 38 forks source link

[WIP] Simplify mouse drag simulation #161

Closed andy-sweet closed 1 year ago

andy-sweet commented 1 year ago

Seems like the tests here can all be a bit flaky: https://github.com/pyapp-kit/superqt/actions/runs/4759738566/jobs/8459314640#step:8:510

It's not immediately obvious to me what the need for simulated fine-grained movements is in these tests, so I just made a single big move instead. Feel free to let me know if I'm missing an important detail here. Alternatively, we could use waitSignal within the for loop if each call is needed.

I'm still not entirely sure about the internals of qtbot and QTest (e.g. in particular where/what is the main event loop and what guarantees are made about processing events).

andy-sweet commented 1 year ago

Well that didn't work

tlambert03 commented 1 year ago

thank you for trying this here @andy-sweet ... yeah, the flaky tests have definitely become annoying (they've only recently started failing, and it's definitely a big PITA at the moment). I appreciate you taking a look. I'm definitely ok with just skipping the offending tests for now (so we can get a release out without doing it manually).

most of the tests here were conceived to fill out test coverage (i.e. to make sure that any additional logic that I added on these sliders was actually getting tested somehow). But, if doing so has now made testing on the whole broken, I'm happy to reconsider