'The reactor registers itself as the I/O thread when it runs so that
L{twisted.python.threadable.isInIOThread} returns C{True} if it is
called in the thread the reactor is running in.'

def test_isInIOThread(self):

    results = []
    reactor = self.buildReactor()
    def check():
        results.append(isInIOThread())
        reactor.stop()
    reactor.callWhenRunning(check)
    self.runReactor(reactor)
    self.assertEqual([True], results)
