def test_cli_shutdown(): ant = CliAnt() cli.shutdown_ant([ant]) assert ant.pool.closed with pytest.raises(SystemExit): cli.shutdown_ant([ant])
def test_cli_shutdown(): ant = CliAnt() ant._queue.put_nowait(object()) cli.shutdown_ant([ant]) assert ant._is_closed assert ant._queue.qsize() == 0 with pytest.raises(SystemExit): cli.shutdown_ant([ant])