# mypy: allow-untyped-defs import pytest_twisted from twisted.internet.task import deferLater def sleep(): import twisted.internet.reactor return deferLater(clock=twisted.internet.reactor, delay=0) @pytest_twisted.inlineCallbacks def test_inlineCallbacks(): yield sleep() @pytest_twisted.ensureDeferred async def test_inlineCallbacks_async(): await sleep()