pygments themes are customizable

This commit is contained in:
Éloi Rivard
2021-06-11 17:04:27 +02:00
parent 2439729413
commit 7770dacb8d
6 changed files with 99 additions and 4 deletions

View File

@@ -239,3 +239,11 @@ Builtin configuration file options
----------------------------------------------
For the full list of options consult the :ref:`reference documentation <ini options ref>`.
Syntax highlighting theme customization
---------------------------------------
The syntax highlighting themes used by pytest can be customized using two environment variables:
- :envvar:`PYTEST_THEME` sets a `pygment style <https://pygments.org/docs/styles/>`_ to use.
- :envvar:`PYTEST_THEME_MODE` sets this style to *light* or *dark*.

View File

@@ -1075,6 +1075,14 @@ Contains comma-separated list of modules that should be loaded as plugins:
export PYTEST_PLUGINS=mymodule.plugin,xdist
.. envvar:: PYTEST_THEME
Sets a `pygment style <https://pygments.org/docs/styles/>`_ to use for the code output.
.. envvar:: PYTEST_THEME_MODE
Sets the :envvar:`PYTEST_THEME` to be either *dark* or *light*.
.. envvar:: PY_COLORS
When set to ``1``, pytest will use color in terminal output.