aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/pyside6/tests/QtAsyncio/qasyncio_test_cancel_taskgroup.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/pyside6/tests/QtAsyncio/qasyncio_test_cancel_taskgroup.py b/sources/pyside6/tests/QtAsyncio/qasyncio_test_cancel_taskgroup.py
index 5f8579bac..5662057d7 100644
--- a/sources/pyside6/tests/QtAsyncio/qasyncio_test_cancel_taskgroup.py
+++ b/sources/pyside6/tests/QtAsyncio/qasyncio_test_cancel_taskgroup.py
@@ -6,10 +6,12 @@ from __future__ import annotations
import asyncio
import unittest
+import sys
import PySide6.QtAsyncio as QtAsyncio
+@unittest.skipIf(sys.version_info < (3, 11), "Requires ExceptionGroup")
class QAsyncioTestCaseCancelTaskGroup(unittest.TestCase):
def setUp(self) -> None:
super().setUp()
@@ -48,7 +50,7 @@ class QAsyncioTestCaseCancelTaskGroup(unittest.TestCase):
for coro in coros:
try:
QtAsyncio.run(self.main(coro), keep_running=False)
- except ExceptionGroup as e:
+ except ExceptionGroup as e: # noqa: F821
self.assertEqual(len(e.exceptions), 1)
self.assertIsInstance(e.exceptions[0], RuntimeError)
self.assertFalse(self._loop_end_reached)