diff options
| author | Adrian Herrmann <adrian.herrmann@qt.io> | 2023-09-12 01:19:33 +0200 |
|---|---|---|
| committer | Adrian Herrmann <adrian.herrmann@qt.io> | 2023-09-12 11:55:32 +0200 |
| commit | a53379153abe1fc3b1ac5625714c6002510c6d73 (patch) | |
| tree | bea6c72fb2ca4d6cea770ddc5fcf88a051c7a785 /sources/pyside6/PySide6/QtAsyncio/tasks.py | |
| parent | 971c5944415cd557112ff046c4b0c41e8b0d5b05 (diff) | |
QtAsyncio: Add queues test
Add a test for the asyncio queue for consumer/producer scenarios.
Additionally, fix a few bugs exposed by this test through the increased
code coverage.
Task-number: PYSIDE-769
Change-Id: I18e3be6d059b758868a7598b58704db216bcdcc8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/PySide6/QtAsyncio/tasks.py')
| -rw-r--r-- | sources/pyside6/PySide6/QtAsyncio/tasks.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/pyside6/PySide6/QtAsyncio/tasks.py b/sources/pyside6/PySide6/QtAsyncio/tasks.py index ca3d08d24..05ee17dd6 100644 --- a/sources/pyside6/PySide6/QtAsyncio/tasks.py +++ b/sources/pyside6/PySide6/QtAsyncio/tasks.py @@ -62,7 +62,7 @@ class QAsyncioTask(futures.QAsyncioFuture): exception_or_future: typing.Union[ Exception, futures.QAsyncioFuture, None] = None): if self.done(): - raise asyncio.exceptions.InvalidStateError("Task is already done") + return result = None try: if exception_or_future is None: |
