コード例 #1
0
ファイル: test_log.py プロジェクト: 1stvamp/pip
def test_should_color_isatty():
    class FakeTTY(object):
        def isatty(self):
            return True

    consumer = FakeTTY()
    assert should_color(consumer, {}, std=[consumer])
コード例 #2
0
def test_should_color_isatty():
    class FakeTTY(object):
        def isatty(self):
            return True

    consumer = FakeTTY()
    assert should_color(consumer, {}, std=[consumer])
コード例 #3
0
ファイル: test_log.py プロジェクト: 1stvamp/pip
def test_should_color_std():
    assert not should_color(object(), {}, std=[object()])
コード例 #4
0
ファイル: test_log.py プロジェクト: 1stvamp/pip
def test_should_color_notty_environ():
    consumer = object()
    assert not should_color(consumer, {}, std=[consumer])
コード例 #5
0
ファイル: test_log.py プロジェクト: 1stvamp/pip
def test_should_color_environ():
    consumer = object()
    assert should_color(consumer, {"TERM": "ANSI"}, std=[consumer])
コード例 #6
0
def test_should_color_std():
    assert not should_color(object(), {}, std=[object()])
コード例 #7
0
def test_should_color_notty_environ():
    consumer = object()
    assert not should_color(consumer, {}, std=[consumer])
コード例 #8
0
def test_should_color_environ():
    consumer = object()
    assert should_color(consumer, {"TERM": "ANSI"}, std=[consumer])