mutmut 3.2.3__tar.gz → 3.3.1__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.
Files changed (41) hide show
  1. {mutmut-3.2.3 → mutmut-3.3.1}/AUTHORS.rst +6 -0
  2. {mutmut-3.2.3 → mutmut-3.3.1}/HISTORY.rst +50 -0
  3. {mutmut-3.2.3 → mutmut-3.3.1}/PKG-INFO +29 -4
  4. {mutmut-3.2.3 → mutmut-3.3.1}/README.rst +26 -1
  5. {mutmut-3.2.3 → mutmut-3.3.1}/mutmut/.DS_Store +0 -0
  6. mutmut-3.3.1/mutmut/__init__.py +21 -0
  7. {mutmut-3.2.3 → mutmut-3.3.1}/mutmut/__main__.py +207 -464
  8. mutmut-3.3.1/mutmut/__pycache__/__init__.cpython-312.pyc +0 -0
  9. mutmut-3.3.1/mutmut/__pycache__/__main__.cpython-312.pyc +0 -0
  10. mutmut-3.3.1/mutmut/__pycache__/file_mutation.cpython-312.pyc +0 -0
  11. mutmut-3.3.1/mutmut/__pycache__/node_mutation.cpython-312.pyc +0 -0
  12. mutmut-3.3.1/mutmut/__pycache__/trampoline_templates.cpython-312.pyc +0 -0
  13. mutmut-3.3.1/mutmut/file_mutation.py +296 -0
  14. mutmut-3.3.1/mutmut/node_mutation.py +285 -0
  15. mutmut-3.3.1/mutmut/trampoline_templates.py +73 -0
  16. {mutmut-3.2.3 → mutmut-3.3.1}/mutmut.egg-info/PKG-INFO +29 -4
  17. {mutmut-3.2.3 → mutmut-3.3.1}/mutmut.egg-info/SOURCES.txt +14 -1
  18. {mutmut-3.2.3 → mutmut-3.3.1}/mutmut.egg-info/requires.txt +2 -2
  19. {mutmut-3.2.3 → mutmut-3.3.1}/requirements.txt +2 -2
  20. mutmut-3.3.1/tests/e2e/__init__.py +0 -0
  21. mutmut-3.3.1/tests/e2e/test_cli_version.py +9 -0
  22. mutmut-3.3.1/tests/e2e/test_e2e_result_snapshots.py +80 -0
  23. mutmut-3.3.1/tests/test_generation_error_handling.py +35 -0
  24. mutmut-3.3.1/tests/test_mutation.py +710 -0
  25. {mutmut-3.2.3 → mutmut-3.3.1}/tests/test_mutmut3.py +17 -26
  26. mutmut-3.2.3/mutmut/__init__.py +0 -317
  27. mutmut-3.2.3/mutmut/__pycache__/__init__.cpython-312.pyc +0 -0
  28. mutmut-3.2.3/mutmut/__pycache__/__main__.cpython-312.pyc +0 -0
  29. mutmut-3.2.3/tests/test_mutation.py +0 -409
  30. {mutmut-3.2.3 → mutmut-3.3.1}/LICENSE +0 -0
  31. {mutmut-3.2.3 → mutmut-3.3.1}/MANIFEST.in +0 -0
  32. {mutmut-3.2.3 → mutmut-3.3.1}/mutmut/__pycache__/__init__.cpython-311.pyc +0 -0
  33. {mutmut-3.2.3 → mutmut-3.3.1}/mutmut/__pycache__/__main__.cpython-311.pyc +0 -0
  34. {mutmut-3.2.3 → mutmut-3.3.1}/mutmut/result_browser_layout.tcss +0 -0
  35. {mutmut-3.2.3 → mutmut-3.3.1}/mutmut.egg-info/dependency_links.txt +0 -0
  36. {mutmut-3.2.3 → mutmut-3.3.1}/mutmut.egg-info/entry_points.txt +0 -0
  37. {mutmut-3.2.3 → mutmut-3.3.1}/mutmut.egg-info/not-zip-safe +0 -0
  38. {mutmut-3.2.3 → mutmut-3.3.1}/mutmut.egg-info/top_level.txt +0 -0
  39. {mutmut-3.2.3 → mutmut-3.3.1}/setup.cfg +0 -0
  40. {mutmut-3.2.3 → mutmut-3.3.1}/setup.py +0 -0
  41. {mutmut-3.2.3 → mutmut-3.3.1}/tests/__init__.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,56 @@
1
1
  Changelog
2
2
  ---------
3
3
 
4
+ 3.3.1
5
+ ~~~~~
6
+
7
+ * Increased threshold for mutant timeouts
8
+
9
+ * Added `tests_dir` config. Accepts a single entry or a list of directories.
10
+
11
+ * Async generators fixes
12
+
13
+ * Fixed bad mutations for certain string escape sequences
14
+
15
+ * Performance fixes
16
+
17
+ * Various internal bug fixes
18
+
19
+
20
+ 3.3.0
21
+ ~~~~~
22
+
23
+ * Python 3.13 compatibility!
24
+
25
+ * New argument `--show-killed` for `mutmut browse`
26
+
27
+ * Fix to avoid accidentally importing the un-mutated original code
28
+
29
+ * Handle segfault for mutant subprocesses
30
+
31
+ * Added mutations for string literals
32
+
33
+ * Added mutations for common string methods
34
+
35
+ * Faster mutant generation via subprocesses
36
+
37
+ * Fix `self` parameter for mutated class methods
38
+
39
+ * Fix trampoline generation for function calls with 'orig' or 'mutants' as argument names.
40
+
41
+ * Copy full source directory before creating mutants
42
+
43
+ * Improved error message when forced fail test fails
44
+
45
+ * Fixed issue with spaces in the python executable path
46
+
47
+ * Do not mutate `__new__`
48
+
49
+ * Annotate mutant dicts (and fixes compatibility with Pydantic)
50
+
51
+ * Replaced parso with LibCST
52
+
53
+
4
54
  3.2.3
5
55
  ~~~~~
6
56
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mutmut
3
- Version: 3.2.3
3
+ Version: 3.3.1
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: parso
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
  ===============================
@@ -88,6 +88,9 @@ You can also write a mutant to disk from the `browse` interface, or via
88
88
  source code control and committed before you apply a mutant!
89
89
 
90
90
 
91
+ 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.
92
+
93
+
91
94
  Configuration
92
95
  -------------
93
96
 
@@ -99,6 +102,14 @@ In `setup.cfg` in the root of your project you can configure mutmut if you need
99
102
  paths_to_mutate=src/
100
103
  tests_dir=tests/
101
104
 
105
+ If you use `pyproject.toml`, you must specify the paths as array in a `tool.mutmut` section:
106
+
107
+ .. code-block:: toml
108
+
109
+ [tool.mutmut]
110
+ paths_to_mutate = [ "src/" ]
111
+ tests_dir = [ "tests/" ]
112
+
102
113
  See below for more options for configuring mutmut.
103
114
 
104
115
 
@@ -165,6 +176,20 @@ You can exclude files from mutation in `setup.cfg`:
165
176
  *__tests.py
166
177
 
167
178
 
179
+ Enable debug output (increase verbosity)
180
+ ----------------------------------------
181
+
182
+ By default, mutmut "swallows" all the test output etc. so that you get a nice clean output.
183
+
184
+ If you want to see all the detail to aid with debugging, you can set `debug` to `true` in your configuration.
185
+ Note that not all displayed errors are necessarily bad. In particular test runs of the mutated code will lead
186
+ to failing tests.
187
+
188
+ .. code-block::
189
+
190
+ debug=true
191
+
192
+
168
193
  Whitelisting
169
194
  ------------
170
195
 
@@ -190,7 +215,7 @@ Example mutations
190
215
  - break is changed to continue and vice versa
191
216
 
192
217
  In general the idea is that the mutations should be as subtle as possible.
193
- See `__init__.py` for the full list.
218
+ See `node_mutation.py` for the full list and `test_mutation.py` for tests describing them.
194
219
 
195
220
 
196
221
  Workflow
@@ -64,6 +64,9 @@ You can also write a mutant to disk from the `browse` interface, or via
64
64
  source code control and committed before you apply a mutant!
65
65
 
66
66
 
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
+
69
+
67
70
  Configuration
68
71
  -------------
69
72
 
@@ -75,6 +78,14 @@ In `setup.cfg` in the root of your project you can configure mutmut if you need
75
78
  paths_to_mutate=src/
76
79
  tests_dir=tests/
77
80
 
81
+ If you use `pyproject.toml`, you must specify the paths as array in a `tool.mutmut` section:
82
+
83
+ .. code-block:: toml
84
+
85
+ [tool.mutmut]
86
+ paths_to_mutate = [ "src/" ]
87
+ tests_dir = [ "tests/" ]
88
+
78
89
  See below for more options for configuring mutmut.
79
90
 
80
91
 
@@ -141,6 +152,20 @@ You can exclude files from mutation in `setup.cfg`:
141
152
  *__tests.py
142
153
 
143
154
 
155
+ Enable debug output (increase verbosity)
156
+ ----------------------------------------
157
+
158
+ By default, mutmut "swallows" all the test output etc. so that you get a nice clean output.
159
+
160
+ If you want to see all the detail to aid with debugging, you can set `debug` to `true` in your configuration.
161
+ Note that not all displayed errors are necessarily bad. In particular test runs of the mutated code will lead
162
+ to failing tests.
163
+
164
+ .. code-block::
165
+
166
+ debug=true
167
+
168
+
144
169
  Whitelisting
145
170
  ------------
146
171
 
@@ -166,7 +191,7 @@ Example mutations
166
191
  - break is changed to continue and vice versa
167
192
 
168
193
  In general the idea is that the mutations should be as subtle as possible.
169
- See `__init__.py` for the full list.
194
+ See `node_mutation.py` for the full list and `test_mutation.py` for tests describing them.
170
195
 
171
196
 
172
197
  Workflow
@@ -0,0 +1,21 @@
1
+ from collections import defaultdict
2
+
3
+ __version__ = '3.3.1'
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)