1d3907f0dSYaroslav Brustinov# Copyright (C) PyZMQ Developers
2d3907f0dSYaroslav Brustinov# Distributed under the terms of the Modified BSD License.
3d3907f0dSYaroslav Brustinov
4d3907f0dSYaroslav Brustinovimport sys
5d3907f0dSYaroslav Brustinovfrom unittest import TestCase
6d3907f0dSYaroslav Brustinov
7d3907f0dSYaroslav Brustinovclass TestImports(TestCase):
8d3907f0dSYaroslav Brustinov    """Test Imports - the quickest test to ensure that we haven't
9d3907f0dSYaroslav Brustinov    introduced version-incompatible syntax errors."""
10d3907f0dSYaroslav Brustinov
11d3907f0dSYaroslav Brustinov    def test_toplevel(self):
12d3907f0dSYaroslav Brustinov        """test toplevel import"""
13d3907f0dSYaroslav Brustinov        import zmq
14d3907f0dSYaroslav Brustinov
15d3907f0dSYaroslav Brustinov    def test_core(self):
16d3907f0dSYaroslav Brustinov        """test core imports"""
17d3907f0dSYaroslav Brustinov        from zmq import Context
18d3907f0dSYaroslav Brustinov        from zmq import Socket
19d3907f0dSYaroslav Brustinov        from zmq import Poller
20d3907f0dSYaroslav Brustinov        from zmq import Frame
21d3907f0dSYaroslav Brustinov        from zmq import constants
22d3907f0dSYaroslav Brustinov        from zmq import device, proxy
23d3907f0dSYaroslav Brustinov        from zmq import Stopwatch
24d3907f0dSYaroslav Brustinov        from zmq import (
25d3907f0dSYaroslav Brustinov            zmq_version,
26d3907f0dSYaroslav Brustinov            zmq_version_info,
27d3907f0dSYaroslav Brustinov            pyzmq_version,
28d3907f0dSYaroslav Brustinov            pyzmq_version_info,
29d3907f0dSYaroslav Brustinov        )
30d3907f0dSYaroslav Brustinov
31d3907f0dSYaroslav Brustinov    def test_devices(self):
32d3907f0dSYaroslav Brustinov        """test device imports"""
33d3907f0dSYaroslav Brustinov        import zmq.devices
34d3907f0dSYaroslav Brustinov        from zmq.devices import basedevice
35d3907f0dSYaroslav Brustinov        from zmq.devices import monitoredqueue
36d3907f0dSYaroslav Brustinov        from zmq.devices import monitoredqueuedevice
37d3907f0dSYaroslav Brustinov
38d3907f0dSYaroslav Brustinov    def test_log(self):
39d3907f0dSYaroslav Brustinov        """test log imports"""
40d3907f0dSYaroslav Brustinov        import zmq.log
41d3907f0dSYaroslav Brustinov        from zmq.log import handlers
42d3907f0dSYaroslav Brustinov
43d3907f0dSYaroslav Brustinov    def test_eventloop(self):
44d3907f0dSYaroslav Brustinov        """test eventloop imports"""
45d3907f0dSYaroslav Brustinov        import zmq.eventloop
46d3907f0dSYaroslav Brustinov        from zmq.eventloop import ioloop
47d3907f0dSYaroslav Brustinov        from zmq.eventloop import zmqstream
48d3907f0dSYaroslav Brustinov        from zmq.eventloop.minitornado.platform import auto
49d3907f0dSYaroslav Brustinov        from zmq.eventloop.minitornado import ioloop
50d3907f0dSYaroslav Brustinov
51d3907f0dSYaroslav Brustinov    def test_utils(self):
52d3907f0dSYaroslav Brustinov        """test util imports"""
53d3907f0dSYaroslav Brustinov        import zmq.utils
54d3907f0dSYaroslav Brustinov        from zmq.utils import strtypes
55d3907f0dSYaroslav Brustinov        from zmq.utils import jsonapi
56d3907f0dSYaroslav Brustinov
57d3907f0dSYaroslav Brustinov    def test_ssh(self):
58d3907f0dSYaroslav Brustinov        """test ssh imports"""
59d3907f0dSYaroslav Brustinov        from zmq.ssh import tunnel
60d3907f0dSYaroslav Brustinov
61d3907f0dSYaroslav Brustinov
62d3907f0dSYaroslav Brustinov
63