19 lines
353 B
Python
19 lines
353 B
Python
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()
|