Esempio n. 1
0
def test_queue():
    r"""Test creation/removal of queue."""
    mq = IPCComm.get_queue()
    key = str(mq.key)
    assert (CommBase.is_registered('IPCComm', key))
    CommBase.unregister_comm('IPCComm', key, dont_close=True)
    nt.assert_raises(KeyError, IPCComm.remove_queue, mq)
    CommBase.register_comm('IPCComm', key, mq)
    IPCComm.remove_queue(mq)
    assert (not CommBase.is_registered('IPCComm', key))
Esempio n. 2
0
def test_ipcrm_queues():
    r"""Test removal of ipc queues."""
    IPCComm.ipcrm_queues()
    nt.assert_equal(len(IPCComm.ipc_queues()), 0)
    mq = IPCComm.get_queue()
    nt.assert_equal(len(IPCComm.ipc_queues()), 1)
    IPCComm.ipcrm_queues(str(mq.key))
    nt.assert_equal(len(IPCComm.ipc_queues()), 0)
Esempio n. 3
0
def test_ipcrm_queues_not_isntalled():  # pragma: windows
    r"""Test ipcrm_queues if IPC library is not installed."""
    IPCComm.ipcrm_queues()
Esempio n. 4
0
def test_ipcs_not_isntalled():  # pragma: windows
    r"""Test return of ipcs if IPC library is not installed."""
    nt.assert_equal(IPCComm.ipcs(), '')
Esempio n. 5
0
def test_queue_not_installed():  # pragma: windows
    r"""Test return of get_queue if IPC library is not installed."""
    nt.assert_equal(IPCComm.get_queue(), None)
Esempio n. 6
0
def test_ipcrm():
    r"""Test removal of ipc objects."""
    IPCComm.ipcrm()
Esempio n. 7
0
def test_ipc_queues():
    r"""Test list of ipc queues."""
    IPCComm.ipc_queues()
Esempio n. 8
0
def test_ipcs():
    r"""Test list of ipc objects."""
    IPCComm.ipcs()