def setUp(self): if is_monkey_patched(): raise unittest.SkipTest("Can't test libev with monkey patching") if LibevConnection is None: raise unittest.SkipTest( 'libev does not appear to be installed correctly') LibevConnection.initialize_reactor()
def setUp(self): if 'gevent.monkey' in sys.modules: raise unittest.SkipTest("gevent monkey-patching detected") if LibevConnection is None: raise unittest.SkipTest( 'libev does not appear to be installed correctly') LibevConnection.initialize_reactor()
def setUp(self): if is_monkey_patched(): raise unittest.SkipTest("Can't test libev with monkey patching.") if LibevConnection is None: raise unittest.SkipTest('libev does not appear to be installed correctly') LibevConnection.initialize_reactor() super(LibevTimerTest, self).setUp()
def setUp(self): if is_monkey_patched(): raise unittest.SkipTest("Can't test libev with monkey patching") if LibevConnection is None: raise unittest.SkipTest('libev does not appear to be installed correctly') LibevConnection.initialize_reactor() # we patch here rather than as a decorator so that the Mixin can avoid # specifying patch args to test methods patchers = [patch(obj) for obj in ('socket.socket', 'cassandra.io.libevwrapper.IO', 'cassandra.io.libevreactor.LibevLoop.maybe_start' )] for p in patchers: self.addCleanup(p.stop) for p in patchers: p.start()
def setUp(self): if is_monkey_patched(): raise unittest.SkipTest("Can't test libev with monkey patching") if LibevConnection is None: raise unittest.SkipTest('libev does not appear to be installed correctly') LibevConnection.initialize_reactor() # we patch here rather than as a decorator so that the Mixin can avoid # specifying patch args to test methods patchers = [patch(obj) for obj in ('socket.socket', 'cassandra.io.libevwrapper.IO', 'cassandra.io.libevreactor.LibevLoop.maybe_start' )] for p in patchers: self.addCleanup(p.stop) for p in patchers: p.start()
def setUp(self): if 'gevent.monkey' in sys.modules: raise unittest.SkipTest("Can't test libev with monkey patching") if LibevConnection is None: raise unittest.SkipTest('libev does not appear to be installed correctly') LibevConnection.initialize_reactor()
def setUp(self): if LibevConnection is None: raise unittest.SkipTest( 'libev does not appear to be installed correctly') LibevConnection.initialize_reactor()
def setUp(self): if LibevConnection is None: raise unittest.SkipTest('libev does not appear to be installed correctly') LibevConnection.initialize_reactor()