@@ -50,7 +50,7 @@ class PingPong:
5050
5151 The coroutine yields to the event loop but is resumed
5252 immediately, without running others in the meantime.
53- This is mainly useful for debugging the event loop.
53+ This is mainly useful for ensuring the event loop is used .
5454 """
5555
5656 def __await__ (self ) -> "Generator[PingPong, Any, Any]" :
@@ -68,7 +68,8 @@ def sync(test_case: Callable[..., Coroutine[None, Any, Any]]) -> Callable[..., N
6868 Mark an ``async def`` test case to be run synchronously
6969
7070 This emulates a primitive "event loop" which only responds
71- to the :py:class:`PingPong` by sending it back.
71+ to the :py:class:`PingPong` by sending it back. This loop
72+ is appropriate for tests that do not check concurrency.
7273 """
7374
7475 @wraps (test_case )
@@ -145,14 +146,21 @@ async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any):
145146
146147
147148def multi_sync (
148- test_case : Callable [..., Coroutine [None , Any , Any ]]
149+ test_case : Callable [..., Coroutine [None , Any , Any ]], /
149150) -> Callable [..., None ]:
150151 """
151152 Mark an ``async def`` test case to be run synchronously with children
152153
153- This emulates a primitive "event loop" which only responds
154+ This provides a primitive "event loop" which only responds
154155 to the :py:class:`PingPong`, :py:class:`Schedule`, :py:class:`Switch`
155- and :py:class:`Lock`.
156+ and :py:class:`Lock`. This loop is appropriate for tests that need
157+ to check concurrency.
158+
159+ It should be applied as a decorator on an ``async def`` function, which
160+ is then turned into a synchronous callable that will run the ``async def``
161+ function and all tasks it spawns.
162+ Other decorators, most prominently :py:func:`pytest.mark.parametrize`,
163+ can be applied around it.
156164 """
157165
158166 @wraps (test_case )
0 commit comments