-
-
Notifications
You must be signed in to change notification settings - Fork 70
[WIP] Add waitSignals. #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Add waitSignals. #43
Conversation
Thanks @The-Compiler! As I said in #42, I'm a little short on time today, but will do my best to work on this tomorrow! 😄 Cheers 🍻 |
Cleaned up stacktraces:
Unfortunately not too detailed... |
Nice! 😄 While I like the idea of waiting for multiple signals, there is duplicated logic in # wait a single signal
qtbot.waitSignal(signal)
# wait multiple signals
qtbot.waitSignal([signal1, signal2]) |
I could do that as well - I originally thought of that but went for the other approach for the following reasons:
What do you think about adding a |
You raise some very valid points, thanks.
IIUC, you mean a user either uses |
Sorry, yes - I meant adding
However, what would At this point, I think the details get too complicated, and it's better to make a clear distinction and have two kinds of blockers. The best idea I can think of to reduce code duplication is to have an |
I agree, having a commom base implementation just to share code seems to be the best approach here. Feel free if you want to share the work here though (letting me worry about the refactor, for example), my main concern is to nail down the public interface correctly... we can always refactor that later. 😄 |
I cleaned the previous commit up and added ad507a4 where I refactored the code so a common I still prefer the public interface like this, i.e. having two separate things:
This way, there's hopefully less user confusion (AND/OR) and less corner cases ( But if you have other ideas, let me know and we can discuss! Two things I'm not sure about:
|
I agree that having both Perhaps we can remove
I think it is possible to document it in
I agree, it will probably get messy. Let's keep them separated, even at the cost of of some code duplication. I will refactor them later to share more code. (Sorry if this is taking longer/more trouble than you expected, I want to sure to nail down a nice public API before this goes out 😄) |
Hmm, I have to say I don't really like
Same here - I only really added it because
Thanks! Would you mind also taking care of removing
No worries! It's always better to get public APIs right instead of rushing, and it's not like I desparately need it, I'm still busy with other tests in qutebrowser which don't need that functionality. |
No problem, let's go with your original proposal then. But if you think of a name you like and makes it explicit about waiting all signals, let me know.
Sure, I will also take care of the docs. 😄 I will only be able to tackle this next week though, as I'm gonna travel this weekend. 😅 |
Merged! Took a little work to refactor all the tests in a manner to cover all cases, but I think it was worth it. 😅 Thanks again @The-Compiler, your interest and contributions are greatly appreciated! 😄 |
Thanks for taking over - looks good to me! I just opened #51 with an additional small test - after that, what are your plans regarding releasing 1.4.0? I'd certainly appreciate it, and I think I'm done with PRs until there's something new I miss 😉 |
As soon as I finish #40... Hopefully by the end of this week. It's nearly done, just need a little more time to finish it. 😄 |
Awesome, that's going to be a great release 😄 Take your time, and let me know if you still need my help/opinion on anything - I lost track a bit 😊 |
Sure thing, thank you! 😄 |
After I was stuck with the other PR I tried adding something else I've been missing: The possibility to wait for multiple signals (until all have been emitted).
Here I also get a segfault: