mutmut 3.2.2__tar.gz → 3.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mutmut-3.2.2 → mutmut-3.3.0}/AUTHORS.rst +6 -0
- {mutmut-3.2.2 → mutmut-3.3.0}/HISTORY.rst +48 -0
- {mutmut-3.2.2 → mutmut-3.3.0}/PKG-INFO +31 -10
- {mutmut-3.2.2 → mutmut-3.3.0}/README.rst +28 -7
- {mutmut-3.2.2 → mutmut-3.3.0}/mutmut/.DS_Store +0 -0
- mutmut-3.3.0/mutmut/__init__.py +21 -0
- {mutmut-3.2.2 → mutmut-3.3.0}/mutmut/__main__.py +140 -461
- mutmut-3.3.0/mutmut/__pycache__/__init__.cpython-312.pyc +0 -0
- mutmut-3.3.0/mutmut/__pycache__/__main__.cpython-312.pyc +0 -0
- mutmut-3.3.0/mutmut/__pycache__/file_mutation.cpython-312.pyc +0 -0
- mutmut-3.3.0/mutmut/__pycache__/node_mutation.cpython-312.pyc +0 -0
- mutmut-3.3.0/mutmut/__pycache__/trampoline_templates.cpython-312.pyc +0 -0
- mutmut-3.3.0/mutmut/file_mutation.py +326 -0
- mutmut-3.3.0/mutmut/node_mutation.py +258 -0
- mutmut-3.3.0/mutmut/trampoline_templates.py +79 -0
- {mutmut-3.2.2 → mutmut-3.3.0}/mutmut.egg-info/PKG-INFO +31 -10
- {mutmut-3.2.2 → mutmut-3.3.0}/mutmut.egg-info/SOURCES.txt +16 -1
- {mutmut-3.2.2 → mutmut-3.3.0}/mutmut.egg-info/requires.txt +2 -2
- {mutmut-3.2.2 → mutmut-3.3.0}/mutmut.egg-info/top_level.txt +1 -0
- mutmut-3.3.0/requirements.txt +7 -0
- mutmut-3.3.0/tests/__init__.py +0 -0
- mutmut-3.3.0/tests/e2e/__init__.py +0 -0
- mutmut-3.3.0/tests/e2e/test_cli_version.py +9 -0
- mutmut-3.3.0/tests/e2e/test_e2e_result_snapshots.py +80 -0
- mutmut-3.3.0/tests/test_mutation.py +697 -0
- mutmut-3.3.0/tests/test_mutmut3.py +77 -0
- mutmut-3.2.2/mutmut/__init__.py +0 -317
- mutmut-3.2.2/mutmut/__pycache__/__init__.cpython-312.pyc +0 -0
- mutmut-3.2.2/mutmut/__pycache__/__main__.cpython-312.pyc +0 -0
- mutmut-3.2.2/requirements.txt +0 -6
- {mutmut-3.2.2 → mutmut-3.3.0}/LICENSE +0 -0
- {mutmut-3.2.2 → mutmut-3.3.0}/MANIFEST.in +0 -0
- {mutmut-3.2.2 → mutmut-3.3.0}/mutmut/__pycache__/__init__.cpython-311.pyc +0 -0
- {mutmut-3.2.2 → mutmut-3.3.0}/mutmut/__pycache__/__main__.cpython-311.pyc +0 -0
- {mutmut-3.2.2 → mutmut-3.3.0}/mutmut/result_browser_layout.tcss +0 -0
- {mutmut-3.2.2 → mutmut-3.3.0}/mutmut.egg-info/dependency_links.txt +0 -0
- {mutmut-3.2.2 → mutmut-3.3.0}/mutmut.egg-info/entry_points.txt +0 -0
- {mutmut-3.2.2 → mutmut-3.3.0}/mutmut.egg-info/not-zip-safe +0 -0
- {mutmut-3.2.2 → mutmut-3.3.0}/setup.cfg +0 -0
- {mutmut-3.2.2 → mutmut-3.3.0}/setup.py +0 -0
|
@@ -21,3 +21,9 @@ Credits
|
|
|
21
21
|
* Roxane Bellott <roxane.bellot@gmail.com>
|
|
22
22
|
* Tomáš Chvátal <tchvatal@suse.com>
|
|
23
23
|
* Frank Hoffmann <15r10nk-git@polarbit.de>
|
|
24
|
+
* Éloi Rivard <eloi@yaal.coop>
|
|
25
|
+
* Isidro Arias <isidroariass@hotmail.es>
|
|
26
|
+
* Will Gibson
|
|
27
|
+
* Dominic Amato <dominic.a.amato@gmail.com>
|
|
28
|
+
* A_A
|
|
29
|
+
* Luzin Boris <borisluzin2004@gmail.com>
|
|
@@ -1,6 +1,54 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
---------
|
|
3
3
|
|
|
4
|
+
3.3.0
|
|
5
|
+
~~~~~
|
|
6
|
+
|
|
7
|
+
* Python 3.13 compatibility!
|
|
8
|
+
|
|
9
|
+
* New argument `--show-killed` for `mutmut browse`
|
|
10
|
+
|
|
11
|
+
* Fix to avoid accidentally importing the un-mutated original code
|
|
12
|
+
|
|
13
|
+
* Handle segfault for mutant subprocesses
|
|
14
|
+
|
|
15
|
+
* Added mutations for string literals
|
|
16
|
+
|
|
17
|
+
* Added mutations for common string methods
|
|
18
|
+
|
|
19
|
+
* Faster mutant generation via subprocesses
|
|
20
|
+
|
|
21
|
+
* Fix `self` parameter for mutated class methods
|
|
22
|
+
|
|
23
|
+
* Fix trampoline generation for function calls with 'orig' or 'mutants' as argument names.
|
|
24
|
+
|
|
25
|
+
* Copy full source directory before creating mutants
|
|
26
|
+
|
|
27
|
+
* Improved error message when forced fail test fails
|
|
28
|
+
|
|
29
|
+
* Fixed issue with spaces in the python executable path
|
|
30
|
+
|
|
31
|
+
* Do not mutate `__new__`
|
|
32
|
+
|
|
33
|
+
* Annotate mutant dicts (and fixes compatibility with Pydantic)
|
|
34
|
+
|
|
35
|
+
* Replaced parso with LibCST
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
3.2.3
|
|
39
|
+
~~~~~
|
|
40
|
+
|
|
41
|
+
* Crash with error message on invalid imports for `src` module
|
|
42
|
+
|
|
43
|
+
* Autodetect simpler project configurations with `test_*.py` in the dir directly
|
|
44
|
+
|
|
45
|
+
* Handle filenames (as opposed to dirnames) in paths_to_mutate
|
|
46
|
+
|
|
47
|
+
* Also copy `setup.cfg` and `pyproject.toml` by default
|
|
48
|
+
|
|
49
|
+
* Handle single line `paths_to_mutate`
|
|
50
|
+
|
|
51
|
+
|
|
4
52
|
3.2.2
|
|
5
53
|
~~~~~
|
|
6
54
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mutmut
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.3.0
|
|
4
4
|
Summary: mutation testing for Python 3
|
|
5
5
|
Home-page: https://github.com/boxed/mutmut
|
|
6
6
|
Author: Anders Hovmöller
|
|
@@ -15,12 +15,12 @@ Classifier: Programming Language :: Python :: 3
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.7
|
|
16
16
|
License-File: LICENSE
|
|
17
17
|
License-File: AUTHORS.rst
|
|
18
|
-
Requires-Dist:
|
|
18
|
+
Requires-Dist: libcst~=1.7.0
|
|
19
19
|
Requires-Dist: click
|
|
20
|
-
Requires-Dist: junit-xml==1.8
|
|
21
20
|
Requires-Dist: setproctitle
|
|
22
21
|
Requires-Dist: textual
|
|
23
22
|
Requires-Dist: toml>=0.10.2; python_version < "3.11"
|
|
23
|
+
Requires-Dist: pytest
|
|
24
24
|
|
|
25
25
|
mutmut - python mutation tester
|
|
26
26
|
===============================
|
|
@@ -76,12 +76,6 @@ it will try to figure out where the code to mutate is.
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
79
|
-
.. code-block:: ini
|
|
80
|
-
|
|
81
|
-
[mutmut]
|
|
82
|
-
paths_to_mutate=src/
|
|
83
|
-
tests_dir=tests/
|
|
84
|
-
|
|
85
79
|
You can stop the mutation run at any time and mutmut will restart where you
|
|
86
80
|
left off. It will continue where it left off, and re-test functions that were
|
|
87
81
|
modified since last run.
|
|
@@ -94,6 +88,28 @@ You can also write a mutant to disk from the `browse` interface, or via
|
|
|
94
88
|
source code control and committed before you apply a mutant!
|
|
95
89
|
|
|
96
90
|
|
|
91
|
+
Configuration
|
|
92
|
+
-------------
|
|
93
|
+
|
|
94
|
+
In `setup.cfg` in the root of your project you can configure mutmut if you need to:
|
|
95
|
+
|
|
96
|
+
.. code-block:: ini
|
|
97
|
+
|
|
98
|
+
[mutmut]
|
|
99
|
+
paths_to_mutate=src/
|
|
100
|
+
tests_dir=tests/
|
|
101
|
+
|
|
102
|
+
If you use `pyproject.toml`, you must specify the paths as array in a `tool.mutmut` section:
|
|
103
|
+
|
|
104
|
+
.. code-block:: toml
|
|
105
|
+
|
|
106
|
+
[tool.mutmut]
|
|
107
|
+
paths_to_mutate = [ "src/" ]
|
|
108
|
+
tests_dir = [ "tests/" ]
|
|
109
|
+
|
|
110
|
+
See below for more options for configuring mutmut.
|
|
111
|
+
|
|
112
|
+
|
|
97
113
|
Wildcards for testing mutants
|
|
98
114
|
-----------------------------
|
|
99
115
|
|
|
@@ -182,7 +198,7 @@ Example mutations
|
|
|
182
198
|
- break is changed to continue and vice versa
|
|
183
199
|
|
|
184
200
|
In general the idea is that the mutations should be as subtle as possible.
|
|
185
|
-
See `
|
|
201
|
+
See `node_mutation.py` for the full list and `test_mutation.py` for tests describing them.
|
|
186
202
|
|
|
187
203
|
|
|
188
204
|
Workflow
|
|
@@ -200,3 +216,8 @@ This section describes how to work with mutmut to enhance your test suite.
|
|
|
200
216
|
Mutmut keeps the data of what it has done and the mutants in the `mutants/`
|
|
201
217
|
directory.If you want to make sure you run a full mutmut run you can delete
|
|
202
218
|
this directory to start from scratch.
|
|
219
|
+
|
|
220
|
+
Contributing to Mutmut
|
|
221
|
+
----------------------
|
|
222
|
+
|
|
223
|
+
If you wish to contribute to Mutmut, please see our `contributing guide <CONTRIBUTING.rst>`_.
|
|
@@ -52,12 +52,6 @@ it will try to figure out where the code to mutate is.
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
.. code-block:: ini
|
|
56
|
-
|
|
57
|
-
[mutmut]
|
|
58
|
-
paths_to_mutate=src/
|
|
59
|
-
tests_dir=tests/
|
|
60
|
-
|
|
61
55
|
You can stop the mutation run at any time and mutmut will restart where you
|
|
62
56
|
left off. It will continue where it left off, and re-test functions that were
|
|
63
57
|
modified since last run.
|
|
@@ -70,6 +64,28 @@ You can also write a mutant to disk from the `browse` interface, or via
|
|
|
70
64
|
source code control and committed before you apply a mutant!
|
|
71
65
|
|
|
72
66
|
|
|
67
|
+
Configuration
|
|
68
|
+
-------------
|
|
69
|
+
|
|
70
|
+
In `setup.cfg` in the root of your project you can configure mutmut if you need to:
|
|
71
|
+
|
|
72
|
+
.. code-block:: ini
|
|
73
|
+
|
|
74
|
+
[mutmut]
|
|
75
|
+
paths_to_mutate=src/
|
|
76
|
+
tests_dir=tests/
|
|
77
|
+
|
|
78
|
+
If you use `pyproject.toml`, you must specify the paths as array in a `tool.mutmut` section:
|
|
79
|
+
|
|
80
|
+
.. code-block:: toml
|
|
81
|
+
|
|
82
|
+
[tool.mutmut]
|
|
83
|
+
paths_to_mutate = [ "src/" ]
|
|
84
|
+
tests_dir = [ "tests/" ]
|
|
85
|
+
|
|
86
|
+
See below for more options for configuring mutmut.
|
|
87
|
+
|
|
88
|
+
|
|
73
89
|
Wildcards for testing mutants
|
|
74
90
|
-----------------------------
|
|
75
91
|
|
|
@@ -158,7 +174,7 @@ Example mutations
|
|
|
158
174
|
- break is changed to continue and vice versa
|
|
159
175
|
|
|
160
176
|
In general the idea is that the mutations should be as subtle as possible.
|
|
161
|
-
See `
|
|
177
|
+
See `node_mutation.py` for the full list and `test_mutation.py` for tests describing them.
|
|
162
178
|
|
|
163
179
|
|
|
164
180
|
Workflow
|
|
@@ -176,3 +192,8 @@ This section describes how to work with mutmut to enhance your test suite.
|
|
|
176
192
|
Mutmut keeps the data of what it has done and the mutants in the `mutants/`
|
|
177
193
|
directory.If you want to make sure you run a full mutmut run you can delete
|
|
178
194
|
this directory to start from scratch.
|
|
195
|
+
|
|
196
|
+
Contributing to Mutmut
|
|
197
|
+
----------------------
|
|
198
|
+
|
|
199
|
+
If you wish to contribute to Mutmut, please see our `contributing guide <CONTRIBUTING.rst>`_.
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from collections import defaultdict
|
|
2
|
+
|
|
3
|
+
__version__ = '3.3.0'
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
duration_by_test = {}
|
|
7
|
+
stats_time = None
|
|
8
|
+
config = None
|
|
9
|
+
|
|
10
|
+
_stats = set()
|
|
11
|
+
tests_by_mangled_function_name = defaultdict(set)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _reset_globals():
|
|
15
|
+
global duration_by_test, stats_time, config, _stats, tests_by_mangled_function_name
|
|
16
|
+
|
|
17
|
+
duration_by_test = {}
|
|
18
|
+
stats_time = None
|
|
19
|
+
config = None
|
|
20
|
+
_stats = set()
|
|
21
|
+
tests_by_mangled_function_name = defaultdict(set)
|