You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+41-20Lines changed: 41 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,20 @@ source code control and committed before you apply a mutant!
67
67
If during the installation you get an error for the `libcst` dependency mentioning the lack of a rust compiler on your system, it is because your architecture does not have a prebuilt binary for `libcst` and it requires both `rustc` and `cargo` from the [rust toolchain](https://www.rust-lang.org/tools/install) to be built. This is known for at least the `x86_64-darwin` architecture.
68
68
69
69
70
+
Wildcards for testing mutants
71
+
-----------------------------
72
+
73
+
Unix filename pattern matching style on mutants is supported. Example:
74
+
75
+
.. code-block:: console
76
+
77
+
mutmut run "my_module*"
78
+
mutmut run "my_module.my_function*"
79
+
80
+
In the `browse` TUI you can press `f` to retest a function, and `m` to retest
81
+
an entire module.
82
+
83
+
70
84
Configuration
71
85
-------------
72
86
@@ -89,22 +103,8 @@ If you use `pyproject.toml`, you must specify the paths as array in a `tool.mutm
89
103
See below for more options for configuring mutmut.
90
104
91
105
92
-
Wildcards for testing mutants
93
-
-----------------------------
94
-
95
-
Unix filename pattern matching style on mutants is supported. Example:
96
-
97
-
.. code-block:: console
98
-
99
-
mutmut run "my_module*"
100
-
mutmut run "my_module.my_function*"
101
-
102
-
In the `browse` TUI you can press `f` to retest a function, and `m` to retest
103
-
an entire module.
104
-
105
-
106
106
"also copy" files
107
-
-----------------
107
+
~~~~~~~~~~~~~~~~~
108
108
109
109
To run the full test suite some files are often needed above the tests and the
110
110
source. You can configure to copy extra files that you need by adding
@@ -118,7 +118,7 @@ directories and files to `also_copy` in your `setup.cfg`:
118
118
119
119
120
120
Limit stack depth
121
-
-----------------
121
+
~~~~~~~~~~~~~~~~~
122
122
123
123
In big code bases some functions are called incidentally by huge swaths of the
124
124
codebase, but you really don't want tests that hit those executions to count
@@ -142,7 +142,7 @@ caught.
142
142
143
143
144
144
Exclude files from mutation
145
-
---------------------------
145
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
146
146
147
147
You can exclude files from mutation in `setup.cfg`:
148
148
@@ -153,7 +153,7 @@ You can exclude files from mutation in `setup.cfg`:
153
153
154
154
155
155
Enable coverage.py filtering of lines to mutate
156
-
-----------------------------------------------
156
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
157
157
158
158
By default, mutmut will mutate only functions that are called. But, if you would like a finer grained (line-level)
159
159
check for coverage, mutmut can use coverage.py to do that.
@@ -168,7 +168,7 @@ If you only want to mutate lines that are called (according to coverage.py), you
168
168
169
169
170
170
Enable debug output (increase verbosity)
171
-
----------------------------------------
171
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
172
172
173
173
By default, mutmut "swallows" all the test output etc. so that you get a nice clean output.
174
174
@@ -182,7 +182,7 @@ to failing tests.
182
182
183
183
184
184
Whitelisting
185
-
------------
185
+
~~~~~~~~~~~~
186
186
187
187
You can mark lines like this:
188
188
@@ -198,6 +198,27 @@ whitelist lines are:
198
198
to continue, but it's slower.
199
199
200
200
201
+
Modifying pytest arguments
202
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
203
+
204
+
You can add and override pytest arguments:
205
+
206
+
.. code-block:: python
207
+
208
+
# for CLI args that select or deselect tests, use `pytest_add_cli_args_test_selection`
0 commit comments