-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move the pytest hardcoded options from pyproject.toml to noxfile.py adds a tests/README.rst to document the dev workflow for unit testing. fix typo in index.rst
- Loading branch information
Showing
4 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Unit tests | ||
========== | ||
|
||
To run unit tests for the sphinx-immaterial theme, there must first be dependencies installed. | ||
Install the dependencies by executing the following from the repo root folder: | ||
|
||
.. code-block:: shell | ||
pip install -r tests/requirements.txt | ||
You should now be ready to run the unit tests. This can be done directly with pytest CLI: | ||
|
||
.. code-block:: shell | ||
pytest -vv -s | ||
Using ``nox`` | ||
------------- | ||
|
||
This repo is setup to use `nox <https://nox.thea.codes/en/stable/>`_ in a Continuous Integration | ||
workflow. The above instructions can be executed with 1 ``nox`` command. | ||
|
||
.. code-block:: shell | ||
nox -s tests | ||
Code Coverage | ||
------------- | ||
|
||
Code coverage is included when using `nox <https://nox.thea.codes/en/stable/>`_ as well. | ||
The coverage report should be generated *after* running the tests with ``nox``. | ||
|
||
.. code-block:: shell | ||
nox -s coverage | ||
This will generate a ``.coverage_.md`` file of the coverage summary and a more in-depth analysis | ||
in HTML form located in ``htmlcov`` folder at the repo's root. |