Esempio n. 1
0
def test_ipcrm_queues():
    r"""Test removal of ipc queues."""
    IPCComm.ipcrm_queues()
    assert (len(IPCComm.ipc_queues()) == 0)
    mq = IPCComm.get_queue()
    assert (len(IPCComm.ipc_queues()) == 1)
    IPCComm.ipcrm_queues(str(mq.key))
    assert (len(IPCComm.ipc_queues()) == 0)
Esempio n. 2
0
def test_queue():
    r"""Test creation/removal of queue."""
    mq = IPCComm.get_queue()
    key = str(mq.key)
    assert (CommBase.is_registered('ipc', key))
    IPCComm.IPCComm.unregister_comm(key, dont_close=True)
    assert_raises(KeyError, IPCComm.remove_queue, mq)
    IPCComm.IPCComm.register_comm(key, mq)
    IPCComm.remove_queue(mq)
    assert (not CommBase.is_registered('ipc', key))
Esempio n. 3
0
def test_queue_not_installed():  # pragma: windows
    r"""Test return of get_queue if IPC library is not installed."""
    assert (IPCComm.get_queue() is None)