aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtAsyncio/qasyncio_test_uncancel.py
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2025-07-04 10:06:13 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2025-07-07 14:46:08 +0200
commitce1175fbf1bfb05461add6ce2e157283e1badf39 (patch)
treeb62a1176fb8b5195950485d8b7c2e86e38008ca2 /sources/pyside6/tests/QtAsyncio/qasyncio_test_uncancel.py
parent25f32760033bb978e5c89b65f4ccf9362a23bff2 (diff)
QtAsyncio: Include this non-Qt module into normal testing
QtAsyncio has tests like other modules, although they were not automatically tested. Add a way to specify this kind of modules without conflicts in cmake. Initial-patch-by: Christian Tismer <tismer@stackless.com> Task-number: PYSIDE-769 Change-Id: I9897f37c98c400846af77d18533486fb048aca80 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside6/tests/QtAsyncio/qasyncio_test_uncancel.py')
-rw-r--r--sources/pyside6/tests/QtAsyncio/qasyncio_test_uncancel.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/sources/pyside6/tests/QtAsyncio/qasyncio_test_uncancel.py b/sources/pyside6/tests/QtAsyncio/qasyncio_test_uncancel.py
index 036622845..fd75a1fc7 100644
--- a/sources/pyside6/tests/QtAsyncio/qasyncio_test_uncancel.py
+++ b/sources/pyside6/tests/QtAsyncio/qasyncio_test_uncancel.py
@@ -4,12 +4,20 @@ from __future__ import annotations
"""Test cases for QtAsyncio"""
+import os
+import sys
import unittest
-import asyncio
+from pathlib import Path
+sys.path.append(os.fspath(Path(__file__).resolve().parents[1]))
+from init_paths import init_test_paths
+init_test_paths(False)
+
+import asyncio
import PySide6.QtAsyncio as QtAsyncio
+@unittest.skipIf(sys.version_info < (3, 11), "requires Task.uncancel() (Python 3.11+)")
class QAsyncioTestCaseUncancel(unittest.TestCase):
""" https://superfastpython.com/asyncio-cancel-task-cancellation """