Example #1
0
 def test_mq_check_prefix(self):
     ins = self.context.socket(zmq.ROUTER)
     outs = self.context.socket(zmq.DEALER)
     mons = self.context.socket(zmq.PUB)
     
     ins = unicode('in')
     outs = unicode('out')
     self.assertRaises(TypeError, devices.monitoredqueue, ins, outs, mons)
Example #2
0
 def test_unicode(self):
     """Test the unicode representations of the Frames."""
     s = unicode('asdf')
     self.assertRaises(TypeError, zmq.Frame, s)
     u = '§'
     if str is not unicode:
         u = u.decode('utf8')
     for i in range(16):
         s = (2**i)*u
         m = zmq.Frame(s.encode('utf8'))
         self.assertEquals(s, unicode(m.bytes,'utf8'))
Example #3
0
 def test_unicode(self):
     """Test the unicode representations of the Messages."""
     s = unicode('asdf')
     self.assertRaises(TypeError, zmq.Message, s)
     u = '§'
     if str is not unicode:
         u = u.decode('utf8')
     for i in range(16):
         s = (2**i)*u
         m = zmq.Message(s.encode('utf8'))
         self.assertEquals(s, unicode(m.bytes,'utf8'))
 def test_unicode(self):
     """Test the unicode representations of the Messages."""
     s = unicode("asdf")
     self.assertRaises(TypeError, zmq.Message, s)
     u = "§"
     if str is not unicode:
         u = u.decode("utf8")
     for i in range(16):
         s = (2 ** i) * u
         m = zmq.Message(s.encode("utf8"))
         self.assertEquals(s, unicode(m.bytes, "utf8"))
Example #5
0
 def test_unicode(self):
     """Test the unicode representations of the Frames."""
     s = u('asdf')
     self.assertRaises(TypeError, zmq.Frame, s)
     for i in range(16):
         s = (2**i) * u('§')
         m = zmq.Frame(s.encode('utf8'))
         self.assertEqual(s, unicode(m.bytes, 'utf8'))
Example #6
0
 def test_unicode(self):
     """Test the unicode representations of the Frames."""
     s = u('asdf')
     self.assertRaises(TypeError, zmq.Frame, s)
     for i in range(16):
         s = (2**i)*u('§')
         m = zmq.Frame(s.encode('utf8'))
         self.assertEqual(s, unicode(m.bytes,'utf8'))
Example #7
0
 def test_connect_unicode(self):
     s = self.socket(zmq.PUB)
     s.connect(unicode("tcp://127.0.0.1:5555"))
Example #8
0
 def test_bind_unicode(self):
     s = self.socket(zmq.PUB)
     p = s.bind_to_random_port(unicode("tcp://*"))
Example #9
0
 def test_connect_unicode(self):
     s = self.socket(zmq.PUB)
     s.connect(unicode("tcp://127.0.0.1:5555"))
Example #10
0
 def test_bind_unicode(self):
     s = self.socket(zmq.PUB)
     p = s.bind_to_random_port(unicode("tcp://*"))