-
-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Labels
Milestone
Description
As mentioned in #302 (comment) I went through the docs/code and thought about possible API breaks which would make sense for 4.0. Here are a couple of ideas:
- 1. One thing that always irked me a bit is that we have two naming conventions (
add_widgetvs.addWidget). Is it really a good idea to support both? At least in my project, it only lead to using both inconsistently over the years without noticing. Should we get rid of one of those? On the other hand, that's probably a lot of churn for projects using pytest-qt, so I'm not sure if it's worth it. Maybe as an alternative, we could make it possible to configure the desired API style inpytest.iniso that the other style would raise an exception (that could be done after 4.0)? - 2. Right now the user needs to decide between
waitActive,waitExposedandwaitForWindowShown(which might be a hurdle if using the same tests for two different backends). Should we have a wrapper which decides what to use instead? - 3. Shouldn't
waitForWindowShownhave atimeoutas well? (can be done after 4.0) - 4. Does anyone really use
qtbot.stopForInteraction()instead ofqtbot.stop()? A GitHub search reveals 60 results, vs. 122 results for.stop(), though I guess it's mostly used interactively for debugging without being added to the code. Should we remove the long name? - 5. Should we raise the default timeout for
waitSignal()to 5000, similar to QSignalSpy.wait() in Qt and the other default timeouts in pytest-qt? - 6.
waitSignalandwaitSignalscan takeNoneinstead of a signal, in which case they just wait until the timeout occurred. But we already haveqtbot.wait()for that, so is there a reason to support it? - 7. Can we get rid of the
SignalTimeoutErrorcompatibility alias forTimeoutError? - 8. The docs for
pytestqt.logging.Recordsays thatcontextis only available for Qt 5, that can probably be removed now (can be done after 4.0) - 9. (new, see below) Get rid of
qt_wait_signal_raising - 10. (new, see below) Get rid of aliases in
plugin.py