def test_context_versionusernamespace(pl, segment_info, expected_symbol):
    output = powerlinek8s.k8sstatus(pl=pl,
                                    segment_info=segment_info,
                                    show_namespace=True,
                                    show_user=True,
                                    show_version=True)
    assert output == [
        expected_symbol, EXPECTED_NAMESPACE, EXPECTED_USER, EXPECTED_VERSION
    ]
def test_namespace_defaultalert(pl, segment_info, expected_symbol):
    output = powerlinek8s.k8sstatus(pl=pl,
                                    segment_info=segment_info,
                                    show_namespace=True,
                                    namespace_alert=['tools'])
    assert output == [expected_symbol, EXPECTED_NAMESPACE_ALERT]
def test_context_defaultalert(pl, segment_info, expected_symbol):
    output = powerlinek8s.k8sstatus(pl=pl,
                                    segment_info=segment_info,
                                    context_alert=['minikube'])
    assert output == [expected_symbol]
def test_none_items(pl, segment_info, expected_symbol):
    output = powerlinek8s.k8sstatus(pl=pl, segment_info=segment_info)
    assert output is None
def test_envvar_zero(pl, expected_symbol):
    segment_info = {'environ': {'POWERLINE_K8SSTATUS': '0'}}
    output = powerlinek8s.k8sstatus(pl=pl, segment_info=segment_info)
    assert output is None
def test_envvar_notzeroempty(pl, expected_symbol):
    segment_info = {'environ': {}}
    output = powerlinek8s.k8sstatus(pl=pl, segment_info=segment_info)
    assert output == [expected_symbol]
def test_context_notnamespacedefinedtrue(pl, segment_info, expected_symbol):
    output = powerlinek8s.k8sstatus(pl=pl,
                                    segment_info=segment_info,
                                    show_namespace=True)
    assert output == [expected_symbol]
def test_context_notnamespacedefault(pl, segment_info, expected_symbol):
    output = powerlinek8s.k8sstatus(pl=pl, segment_info=segment_info)
    assert output == [expected_symbol]
def test_context_version(pl, segment_info, expected_symbol):
    output = powerlinek8s.k8sstatus(pl=pl,
                                    segment_info=segment_info,
                                    show_version=True)
    assert output == [expected_symbol, EXPECTED_VERSION]
def test_context_user(pl, segment_info, expected_symbol):
    output = powerlinek8s.k8sstatus(pl=pl,
                                    segment_info=segment_info,
                                    show_user=True)
    assert output == [expected_symbol, EXPECTED_USER]
def test_context_namespace(pl, segment_info, expected_symbol):
    output = powerlinek8s.k8sstatus(pl=pl,
                                    segment_info=segment_info,
                                    show_namespace=True)
    assert output == [expected_symbol, EXPECTED_NAMESPACE]