示例#1
0
def server_cleanup():
    """
    Clean up after test fails
    """
    try:
        yield
    finally:
        state.kill_all_servers()
        state._indicators.clear()
        state._locations.clear()
        state._curdoc = None
        if state._thread_pool is not None:
            state._thread_pool.shutdown(wait=False)
            state._thread_pool = None
示例#2
0
def test_kill_all_servers(html_server_session, markdown_server_session):
    _, server_1, _ = html_server_session
    _, server_2, _ = markdown_server_session
    state.kill_all_servers()
    assert server_1._stopped
    assert server_2._stopped