test_etc.py 525 B

1234567891011121314151617181920
  1. # Copyright (c) PyZMQ Developers.
  2. # Distributed under the terms of the Modified BSD License.
  3. import sys
  4. import zmq
  5. from pytest import mark
  6. @mark.skipif('zmq.zmq_version_info() < (4,1)')
  7. def test_has():
  8. assert not zmq.has('something weird')
  9. has_ipc = zmq.has('ipc')
  10. not_windows = not sys.platform.startswith('win')
  11. assert has_ipc == not_windows
  12. @mark.skipif(not hasattr(zmq, '_libzmq'), reason="bundled libzmq")
  13. def test_has_curve():
  14. """bundled libzmq has curve support"""
  15. assert zmq.has('curve')