Exemplo n.º 1
0
def test_should_color_isatty():
    class FakeTTY(object):
        def isatty(self):
            return True

    consumer = FakeTTY()
    assert should_color(consumer, {}, std=[consumer])
Exemplo n.º 2
0
def test_should_color_isatty():
    class FakeTTY(object):
        def isatty(self):
            return True

    consumer = FakeTTY()
    assert should_color(consumer, {}, std=[consumer])
Exemplo n.º 3
0
def test_should_color_std():
    assert not should_color(object(), {}, std=[object()])
Exemplo n.º 4
0
def test_should_color_notty_environ():
    consumer = object()
    assert not should_color(consumer, {}, std=[consumer])
Exemplo n.º 5
0
def test_should_color_environ():
    consumer = object()
    assert should_color(consumer, {"TERM": "ANSI"}, std=[consumer])
Exemplo n.º 6
0
def test_should_color_std():
    assert not should_color(object(), {}, std=[object()])
Exemplo n.º 7
0
def test_should_color_notty_environ():
    consumer = object()
    assert not should_color(consumer, {}, std=[consumer])
Exemplo n.º 8
0
def test_should_color_environ():
    consumer = object()
    assert should_color(consumer, {"TERM": "ANSI"}, std=[consumer])