summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVaĊĦek Dohnal <vaclav.dohnal@gmail.com>2024-02-08 09:21:03 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2024-02-08 11:36:28 +0100
commit1b5338d03ecc962af8ab4678426bc60b0672b8dd (patch)
tree5936e236cbd7a17ce79e6aff5111dd39157a9412 /tests
parent2f14c2cedc9c92373471c1f98a80c81ba299584a (diff)
Fixed #35174 -- Fixed Signal.asend()/asend_robust() crash when all receivers are asynchronous.
Regression in e83a88566a71a2353cebc35992c110be0f8628af.
Diffstat (limited to 'tests')
-rw-r--r--tests/signals/tests.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/signals/tests.py b/tests/signals/tests.py
index 5558778bbe..6c90c6aa52 100644
--- a/tests/signals/tests.py
+++ b/tests/signals/tests.py
@@ -626,3 +626,19 @@ class AsyncReceiversTests(SimpleTestCase):
(async_handler, 1),
],
)
+
+ async def test_asend_only_async_receivers(self):
+ async_handler = AsyncHandler()
+ signal = dispatch.Signal()
+ signal.connect(async_handler)
+
+ result = await signal.asend(self.__class__)
+ self.assertEqual(result, [(async_handler, 1)])
+
+ async def test_asend_robust_only_async_receivers(self):
+ async_handler = AsyncHandler()
+ signal = dispatch.Signal()
+ signal.connect(async_handler)
+
+ result = await signal.asend_robust(self.__class__)
+ self.assertEqual(result, [(async_handler, 1)])