We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68228c3 commit b5f5e04Copy full SHA for b5f5e04
docs/index.rst
@@ -130,11 +130,15 @@ ensuring the results are correct::
130
131
def test_long_computation(qtbot):
132
app = Application()
133
- app.worker.start()
134
+ # Watch for the app.worker.finished signal, then start the worker.
135
with qtbot.waitSignal(app.worker.finished, timeout=10000) as blocker:
136
- assert blocker.signal_triggered
137
- assert_application_results(app)
+ blocker.connect(app.worker.failed) # Can add other signals to blocker
+ app.worker.start()
138
+ # Test will wait here until either signal is emitted, or 10 seconds has elapsed
139
+
140
+ assert blocker.signal_triggered # Assuming the work took less than 10 seconds
141
+ assert_application_results(app)
142
143
144
QtBot
0 commit comments