'Reduce the CPython check interval so that thread switches happen much
more often, hopefully exercising more possible race conditions.  Also,
delay actual test startup until the reactor has been started.'

def setUp(self):

    if _PY3:
        if (getattr(sys, 'getswitchinterval', None) is not None):
            self.addCleanup(sys.setswitchinterval, sys.getswitchinterval())
            sys.setswitchinterval(1e-07)
    elif (getattr(sys, 'getcheckinterval', None) is not None):
        self.addCleanup(sys.setcheckinterval, sys.getcheckinterval())
        sys.setcheckinterval(7)
