-
Notifications
You must be signed in to change notification settings - Fork 42
Minor improvement to qtbot
testing section
#481
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
Conversation
Sorry @psobolewskiPhD I want to add some more items. Just didn't get around to it yet. I'll ping you once dine, thank you! |
@psobolewskiPhD okay I've tried to add more information but I am not knowledgeable on Qt so please let me know if anything is off! |
<br/> | ||
```` | ||
|
||
`qtbot` provides a convenient | ||
`qtbot` also provides a convenient | ||
[`addWidget`](https://pytest-qt.readthedocs.io/en/latest/reference.html#pytestqt.qtbot.QtBot.addWidget) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[`addWidget`](https://pytest-qt.readthedocs.io/en/latest/reference.html#pytestqt.qtbot.QtBot.addWidget) | |
[`add_widget`/`addWidget`](https://pytest-qt.readthedocs.io/en/latest/reference.html#pytestqt.qtbot.QtBot.addWidget) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want both or is there one that you prefer? I guess add_widget
would be more 'python-ic'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks okay as both so will leave
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In our test we are using both of them. So I would like to signal that both are valid.
signals, etc...). See the [`qtbot` docs](https://pytest-qt.readthedocs.io/en/latest/reference.html#pytestqt.qtbot.QtBot) for details. | ||
This prevents leakage between tests. | ||
The | ||
[`waitUntil`](https://pytest-qt.readthedocs.io/en/latest/reference.html#pytestqt.qtbot.QtBot.waitUntil) method is also useful to wait for a desired condition. The example below |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[`waitUntil`](https://pytest-qt.readthedocs.io/en/latest/reference.html#pytestqt.qtbot.QtBot.waitUntil) method is also useful to wait for a desired condition. The example below | |
[`wait_until`/`waitUntil`](https://pytest-qt.readthedocs.io/en/latest/reference.html#pytestqt.qtbot.QtBot.waitUntil) method is also useful to wait for a desired condition. The example below |
Thanks @Czaki ! Changes made |
References and relevant issues
Related zulip: https://napari.zulipchat.com/#narrow/stream/212875-general/topic/qtbot.20documentation
Description