summaryrefslogtreecommitdiff
path: root/doc/docs
diff options
context:
space:
mode:
authorJean Abou-Samra <jean@abou-samra.fr>2023-02-23 13:44:22 +0100
committerGitHub <noreply@github.com>2023-02-23 13:44:22 +0100
commite589fee754a76e9600dcb42baaeb3372d9e163d7 (patch)
tree34a4a1bef36b0d1b65b8925e9751a9ee3bdc7281 /doc/docs
parent1e85f7c2ad2edfeae7f0c566163931324f64f949 (diff)
downloadpygments-git-e589fee754a76e9600dcb42baaeb3372d9e163d7.tar.gz
Replace Makefile with tox (#2331)
Porting notes: - tox handles Python environments automatically. Remove a bit of PYTHONPATH manipulation (that was using Python 2 code which always failed!) - No `clean` target: `git clean -xdf` should fit the bill. - No `reindent` target: the `reindent.py` script it was using does not exist (anymore?). - No equivalent of tox-test-coverage, which was an artifact of the past, using nose. Instead, the test-coverage target only is ported, which uses pytest, and works.
Diffstat (limited to 'doc/docs')
-rw-r--r--doc/docs/lexerdevelopment.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/docs/lexerdevelopment.rst b/doc/docs/lexerdevelopment.rst
index 0809e75e..29bdd6ca 100644
--- a/doc/docs/lexerdevelopment.rst
+++ b/doc/docs/lexerdevelopment.rst
@@ -171,17 +171,17 @@ Add the name of your lexer class to this list (or create the list if your lexer
is the only class in the module).
Finally the lexer can be made publicly known by rebuilding the lexer mapping.
-In the root directory of the source (where the ``Makefile`` is located), run:
+In the root directory of the source (where the ``tox.ini`` file is located), run:
.. code-block:: console
- $ make mapfiles
+ $ tox -e mapfiles
To test the new lexer, store an example file in
``tests/examplefiles/<alias>``. For example, to test your
``DiffLexer``, add a ``tests/examplefiles/diff/example.diff`` containing a
sample diff output. To (re)generate the lexer output which the file is checked
-against, use the command ``pytest tests/examplefiles/diff --update-goldens``.
+against, use the command ``tox -- tests/examplefiles/diff --update-goldens``.
Now you can use ``python -m pygments`` from the current root of the checkout to
render your example to HTML:
@@ -201,7 +201,7 @@ Once the example renders as expected, you should run the complete test suite:
.. code-block:: console
- $ make test
+ $ tox
It also tests that your lexer fulfills the lexer API and certain invariants,
such as that the concatenation of all token text is the same as the input text.