Skip to content

pytest-dev/pygments-pytest

Folders and files

NameName
Last commit message
Last commit date
Oct 30, 2023
Nov 24, 2018
Mar 25, 2022
Oct 25, 2022
Mar 13, 2022
Mar 25, 2024
Nov 22, 2018
Nov 19, 2023
Oct 30, 2023
Jul 13, 2020
Oct 30, 2023
Jan 15, 2022
Oct 30, 2023

Repository files navigation

build status Build Status pre-commit.ci status

pygments-pytest

A pygments lexer for pytest output

See some demos! Or see it in action on pytest.org.

Installation

pip install pygments-pytest

Usage

This library provides a pygments lexer called pytest.

.. code-block:: pytest

    $ pytest test.py
    ========================== test session starts ===========================
    platform linux -- Python 3.6.6, pytest-4.0.1.dev43+g0d529847.d20181123, py-1.7.0, pluggy-0.8.0
    rootdir: /home/asottile/workspace/pytest, inifile: tox.ini
    collected 1 item

    test.py .                                                          [100%]

    ======================== 1 passed in 0.01 seconds ========================

This library also provides a sphinx extension. It can be enabled by adding 'pygments_pytest' to the extensions setting in your conf.py.

The colors can be tweaked using the sphinx setting (in conf.py) pygments_pytest_ansi_colors:

pygments_pytest_ansi_colors = {
    'Cyan': '#06989a',
    'Green': '#4e9a06',
    'Red': '#c00',
    'Yellow': '#c4A000',
}

About

A pygments lexer for pytest output

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages