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