@pytest.hookimpl(tryfirst=True, hookwrapper=True)
def pytest_runtest_makereport(item) -> None:
    "\n    Print out IC Pod logs on test failure.\n\n    Only look at actual failing test calls, not setup/teardown.\n    Only show the logs if commandline argument `--show-ic-logs` is set to 'yes'\n\n    :param item:\n    :return:\n    "
    outcome = (yield)
    rep = outcome.get_result()
    if ((rep.when == 'call') and rep.failed and (item.config.getoption('--show-ic-logs') == 'yes')):
        pod_namespace = item.funcargs['ingress_controller_prerequisites'].namespace
        pod_name = get_first_pod_name(item.funcargs['kube_apis'].v1, pod_namespace)
        print('\n===================== IC Logs Start =====================')
        print(item.funcargs['kube_apis'].v1.read_namespaced_pod_log(pod_name, pod_namespace))
        print('\n===================== IC Logs End =====================')
Print out IC Pod logs on test failure.

Only look at actual failing test calls, not setup/teardown.
Only show the logs if commandline argument `--show-ic-logs` is set to 'yes'

:param item:
:return:
@pytest.hookimpl(tryfirst=True, hookwrapper=True)
def pytest_runtest_makereport(item) -> None:
    "\n    Print out IC Pod logs on test failure.\n\n    Only look at actual failing test calls, not setup/teardown.\n    Only show the logs if commandline argument `--show-ic-logs` is set to 'yes'\n\n    :param item:\n    :return:\n    "
    outcome = (yield)
    rep = outcome.get_result()
    if ((rep.when == 'call') and rep.failed and (item.config.getoption('--show-ic-logs') == 'yes')):
        pod_namespace = item.funcargs['ingress_controller_prerequisites'].namespace
        pod_name = get_first_pod_name(item.funcargs['kube_apis'].v1, pod_namespace)
        print('\n===================== IC Logs Start =====================')
        print(item.funcargs['kube_apis'].v1.read_namespaced_pod_log(pod_name, pod_namespace))
        print('\n===================== IC Logs End =====================')