diff options
author | 2015-08-24 13:22:48 +0300 | |
---|---|---|
committer | 2015-08-24 13:22:48 +0300 | |
commit | dab741a80699f86e86c91718872a052cca9bbb25 (patch) | |
tree | 1959c4a2cea440170a5113dcb067796cb20ffb64 /external_libs/python/zmq/tests/test_error.py | |
parent | d3f26ece7d4383df0b22fe9c3cb3e695381ec737 (diff) |
Fixed dependencies of Control Plane to use external_lib sources
Diffstat (limited to 'external_libs/python/zmq/tests/test_error.py')
-rw-r--r-- | external_libs/python/zmq/tests/test_error.py | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/external_libs/python/zmq/tests/test_error.py b/external_libs/python/zmq/tests/test_error.py deleted file mode 100644 index a2eee14a..00000000 --- a/external_libs/python/zmq/tests/test_error.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf8 -*- -# Copyright (C) PyZMQ Developers -# Distributed under the terms of the Modified BSD License. - -import sys -import time - -import zmq -from zmq import ZMQError, strerror, Again, ContextTerminated -from zmq.tests import BaseZMQTestCase - -if sys.version_info[0] >= 3: - long = int - -class TestZMQError(BaseZMQTestCase): - - def test_strerror(self): - """test that strerror gets the right type.""" - for i in range(10): - e = strerror(i) - self.assertTrue(isinstance(e, str)) - - def test_zmqerror(self): - for errno in range(10): - e = ZMQError(errno) - self.assertEqual(e.errno, errno) - self.assertEqual(str(e), strerror(errno)) - - def test_again(self): - s = self.context.socket(zmq.REP) - self.assertRaises(Again, s.recv, zmq.NOBLOCK) - self.assertRaisesErrno(zmq.EAGAIN, s.recv, zmq.NOBLOCK) - s.close() - - def atest_ctxterm(self): - s = self.context.socket(zmq.REP) - t = Thread(target=self.context.term) - t.start() - self.assertRaises(ContextTerminated, s.recv, zmq.NOBLOCK) - self.assertRaisesErrno(zmq.TERM, s.recv, zmq.NOBLOCK) - s.close() - t.join() - |