我们从Python开源项目中,提取了以下9个代码示例,用于说明如何使用zmq.__version__()。
def test_pyzmq_version(self): vs = zmq.pyzmq_version() vs2 = zmq.__version__ self.assertTrue(isinstance(vs, str)) if zmq.__revision__: self.assertEqual(vs, '@'.join(vs2, zmq.__revision__)) else: self.assertEqual(vs, vs2) if version.VERSION_EXTRA: self.assertTrue(version.VERSION_EXTRA in vs) self.assertTrue(version.VERSION_EXTRA in vs2)
def test_zmq(pyi_builder): pyi_builder.test_source( """ import zmq print(zmq.__version__) print(zmq.zmq_version()) # This is a problematic module and might cause some issues. import zmq.utils.strtypes """)
def test_openpyxl(pyi_builder): pyi_builder.test_source( """ # Test the hook to openpyxl from openpyxl import __version__ """)