Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document configuration with pyproject.toml #300

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ it will try to figure out where the code to mutate lies. Run
mutmut --help

for the available flags, to use other runners, etc. The recommended way to use
mutmut if the defaults aren't working for you is to add a block in ``setup.cfg``.
mutmut if the defaults aren't working for you is to add a
block in ``setup.cfg`` or ``project.toml``.
Then when you come back to mutmut weeks later you don't have to figure out the
flags again, just run ``mutmut run`` and it works. Like this:
flags again, just run ``mutmut run`` and it works.
Like this in ``setup.cfg``:

.. code-block:: ini

Expand All @@ -68,6 +70,14 @@ flags again, just run ``mutmut run`` and it works. Like this:
tests_dir=tests/
dict_synonyms=Struct, NamedStruct

or like this in ``pyproject.toml``:

.. code-block:: ini

[tool.mutmut]
paths_to_mutate="src"
runner="python -m hammett -x"

To use multiple paths either in the ``paths_to_mutate`` or ``tests_dir`` option
use a comma or colon separated list. For example:

Expand Down
Loading