跳转到主要内容

pytest输出的pygments词法分析器。

项目描述

build status Build Status pre-commit.ci status

pygments-pytest

pytest输出的pygments词法分析器

查看一些演示!或者在pytest.org上查看其实际应用

安装

pip install pygments-pytest

用法

此库提供了一个名为pytest的pygments词法分析器。

.. 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 ========================

此库还提供了一个sphinx扩展。您可以通过将'pygments_pytest'添加到conf.py中的extensions设置来启用它。

可以使用sphinx设置(在conf.py中)pygments_pytest_ansi_colors来调整颜色。

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

项目详情


下载文件

下载适合您平台的文件。如果您不确定该选择哪个,请了解更多关于安装包的信息。

源分布

pygments_pytest-2.4.0.tar.gz (4.9 kB 查看哈希值)

上传时间:

构建分布

pygments_pytest-2.4.0-py2.py3-none-any.whl (5.3 kB 查看哈希值)

上传时间: Python 2 Python 3

由以下支持