@pytest.mark.parametrize('verbose', [True, False])
def test_color_yes_collection_on_non_atty(testdir, verbose):
    """skip collect progress report when working on non-terminals.
    #1397
    """
    testdir.makepyfile("""
        import pytest
        @pytest.mark.parametrize('i', range(10))
        def test_this(i):
            assert 1
    """)
    args = ['--color=yes']
    if verbose:
        args.append('-vv')
    result = testdir.runpytest(*args)
    assert 'test session starts' in result.stdout.str()
    assert '\x1b[1m' in result.stdout.str()
    assert 'collecting 10 items' not in result.stdout.str()
    if verbose:
        assert 'collecting ...' in result.stdout.str()
    assert 'collected 10 items' in result.stdout.str()
dataset/ETHPy150Open pytest-dev/pytest/testing/test_terminal.py/test_color_yes_collection_on_non_atty/original