def test_destroy(self): obj = pychirp.Object(ctypes.c_void_p()) self.assertRaises(pychirp.Failure, lambda: obj.destroy()) scheduler = pychirp.Scheduler() scheduler.destroy() self.assertRaises(pychirp.Failure, lambda: scheduler.destroy())
def setUp(self): self.scheduler = pychirp.Scheduler() self.endpointA = pychirp.Leaf(self.scheduler) self.endpointB = pychirp.Leaf(self.scheduler) self.server = None self.server_connection = None self.client = None self.client_connection = None self.connect_handler_res = None self.accept_handler_res = None self.death_handler_res = None
def setUp(self): self.scheduler = pychirp.Scheduler() self.endpointA = pychirp.Leaf(self.scheduler) self.endpointB = pychirp.Leaf(self.scheduler) self.timeout = 5.0 self.identification = 'hello' self.client = pychirp.AutoConnectingTcpClient(self.endpointA, self.ADDRESS, self.PORT, self.timeout, self.identification) self.server = None self.server_connection = None self.connect_handler_res = None self.connect_handler_connection = None self.disconnect_handler_res = None
def test_init(self): obj = pychirp.Object(ctypes.c_void_p()) scheduler = pychirp.Scheduler()
def test_str(self): obj = pychirp.Object(ctypes.c_void_p()) self.assertRegex(str(obj), r'.*Object.*INVALID.*') scheduler = pychirp.Scheduler() self.assertRegex(str(scheduler), r'.*Scheduler.*0x[0-9a-f]{8}.*')
def setUp(self): self.scheduler = pychirp.Scheduler() self.leaf = pychirp.Leaf(self.scheduler)
def setUp(self): self.scheduler = pychirp.Scheduler() self.node = pychirp.Node(self.scheduler)
def setUp(self): self.scheduler = pychirp.Scheduler() self.endpointA = pychirp.Leaf(self.scheduler) self.endpointB = pychirp.Leaf(self.scheduler) self.connection = pychirp.LocalConnection(self.endpointA, self.endpointB)