'test curve_keypair'

def test_keypair(self):

    try:
        (public, secret) = zmq.curve_keypair()
    except zmq.ZMQError:
        raise SkipTest('CURVE    unsupported')
    self.assertEqual(type(secret), bytes)
    self.assertEqual(type(public), bytes)
    self.assertEqual(len(secret), 40)
    self.assertEqual(len(public), 40)
    (bsecret, bpublic) = [z85.decode(key) for key in (public, secret)]
    self.assertEqual(type(bsecret), bytes)
    self.assertEqual(type(bpublic), bytes)
    self.assertEqual(len(bsecret), 32)
    self.assertEqual(len(bpublic), 32)
