def test_reactor_stop_unblocks(self):
        program = """\
import os, threading, signal, time, sys

from twisted.internet.defer import Deferred
from twisted.internet import reactor

import crochet
crochet.setup()

@crochet.%s
def run():
    reactor.callLater(0.1, reactor.stop)
    return Deferred()

try:
    er = run()
except crochet.ReactorStopped:
    sys.exit(23)
"""  % (self.DECORATOR_CALL,)
        process = subprocess.Popen([sys.executable, "-c", program],
                                   cwd=crochet_directory)
        self.assertEqual(process.wait(), 23)
Any @wait_for_reactor-decorated calls still waiting when the reactor
dataset/ETHPy150Open itamarst/crochet/crochet/tests/test_api.py/WaitTestsMixin.test_reactor_stop_unblocks