pytest-deduplicate 0.2.1__tar.gz → 0.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.
Files changed (24) hide show
  1. {pytest_deduplicate-0.2.1/pytest_deduplicate.egg-info → pytest_deduplicate-0.3.0}/PKG-INFO +32 -15
  2. {pytest_deduplicate-0.2.1 → pytest_deduplicate-0.3.0}/README.md +29 -4
  3. {pytest_deduplicate-0.2.1 → pytest_deduplicate-0.3.0}/pyproject.toml +15 -1
  4. {pytest_deduplicate-0.2.1 → pytest_deduplicate-0.3.0/pytest_deduplicate.egg-info}/PKG-INFO +33 -16
  5. {pytest_deduplicate-0.2.1 → pytest_deduplicate-0.3.0}/pytest_deduplicate.egg-info/SOURCES.txt +7 -1
  6. {pytest_deduplicate-0.2.1 → pytest_deduplicate-0.3.0}/pytest_deduplicate.egg-info/entry_points.txt +3 -0
  7. {pytest_deduplicate-0.2.1 → pytest_deduplicate-0.3.0}/pytest_deduplicate.py +346 -83
  8. {pytest_deduplicate-0.2.1 → pytest_deduplicate-0.3.0}/pytest_deduplicate_artifacts.py +22 -10
  9. {pytest_deduplicate-0.2.1 → pytest_deduplicate-0.3.0}/pytest_deduplicate_checks.py +51 -40
  10. {pytest_deduplicate-0.2.1 → pytest_deduplicate-0.3.0}/pytest_deduplicate_import.py +49 -39
  11. pytest_deduplicate-0.3.0/pytest_deduplicate_index.py +59 -0
  12. {pytest_deduplicate-0.2.1 → pytest_deduplicate-0.3.0}/pytest_deduplicate_review.py +10 -5
  13. pytest_deduplicate-0.3.0/tests/test_analyzer.py +338 -0
  14. pytest_deduplicate-0.3.0/tests/test_features.py +207 -0
  15. pytest_deduplicate-0.3.0/tests/test_import_and_reports.py +194 -0
  16. pytest_deduplicate-0.3.0/tests/test_properties.py +111 -0
  17. pytest_deduplicate-0.3.0/tests/test_simple.py +37 -0
  18. pytest_deduplicate-0.3.0/tests/test_sparse_import.py +132 -0
  19. pytest_deduplicate-0.2.1/pytest_deduplicate_index.py +0 -32
  20. {pytest_deduplicate-0.2.1 → pytest_deduplicate-0.3.0}/LICENSE +0 -0
  21. {pytest_deduplicate-0.2.1 → pytest_deduplicate-0.3.0}/pytest_deduplicate.egg-info/dependency_links.txt +0 -0
  22. {pytest_deduplicate-0.2.1 → pytest_deduplicate-0.3.0}/pytest_deduplicate.egg-info/requires.txt +2 -2
  23. {pytest_deduplicate-0.2.1 → pytest_deduplicate-0.3.0}/pytest_deduplicate.egg-info/top_level.txt +0 -0
  24. {pytest_deduplicate-0.2.1 → pytest_deduplicate-0.3.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.1
2
2
  Name: pytest_deduplicate
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: Reports observed test coverage overlap with optional stability and mutation checks
5
5
  Author-email: xor2003 <xor2003@gmx.com>
6
6
  License: GPL
@@ -21,16 +21,8 @@ Classifier: Operating System :: OS Independent
21
21
  Classifier: Topic :: Software Development :: Quality Assurance
22
22
  Requires-Python: >=3.9
23
23
  Description-Content-Type: text/markdown
24
- License-File: LICENSE
25
- Requires-Dist: pytest>=7.4.4
26
- Requires-Dist: coverage>=7.6.1
27
24
  Provides-Extra: dev
28
- Requires-Dist: build>=1; extra == "dev"
29
- Requires-Dist: wheel; extra == "dev"
30
- Requires-Dist: hypothesis>=6.100; extra == "dev"
31
- Requires-Dist: pytest-cov>=5; extra == "dev"
32
- Requires-Dist: pytest-xdist>=3.6; extra == "dev"
33
- Dynamic: license-file
25
+ License-File: LICENSE
34
26
 
35
27
  # pytest_deduplicate
36
28
 
@@ -128,10 +120,13 @@ group does not validate the whole group. Pairwise mutant differences do not
128
120
  prove anything about the fault-detection union of a combined finding. No status
129
121
  authorizes automatic removal.
130
122
 
131
- `tests[].phase_file_arcs` separates setup/call/teardown evidence. By default,
132
- comparisons use all observed protocol activity. Use `--coverage-phase call` to
133
- compare test calls without fixture setup/teardown. Shared fixtures remain
134
- attributed only when executed; phases are not reconstructed for other tests.
123
+ `tests[].phase_file_arcs` separates setup/call/teardown evidence. Live comparisons default to the test call with fixture setup excluded,
124
+ including setup triggered by `request.getfixturevalue`. A direct call by the test
125
+ still counts when a fixture executed the same lines. A passing test with measured
126
+ fixture setup and zero direct arcs is flagged as `fixture_only`. Use `--source`
127
+ to define the application scope. Shared fixtures contribute evidence only when
128
+ they execute. Use `--coverage-phase call` for the full call or
129
+ `--coverage-phase all` for the whole protocol.
135
130
 
136
131
  ## Import pytest-cov and xdist results
137
132
 
@@ -219,3 +214,25 @@ CI covers Python 3.9–3.14, minimum/current dependency combinations, and a Wind
219
214
  The build checker stages an explicit set of release files, excluding unrelated local Cython experiments and untracked `setup.py` files. If such an experimental setup script is present in your working directory, use the checker for release validation; a direct `pip install .` can invoke that script. The committed project uses the pure-Python modules declared in `pyproject.toml`.
220
215
 
221
216
  Python 3.8 is no longer advertised: the original runtime type aliases already required 3.9, and the mutation sampler now explicitly uses Python 3.9's AST support.
217
+
218
+ After installation, run `pytest --deduplicate` to analyze the current pytest session.
219
+ For continuous use, add `--deduplicate` to pytest's `addopts`. This mode
220
+ uses the serial coverage collector and prints its report in the terminal.
221
+
222
+ Live runs include fixture diagnostics in text and JSON (`fixture_findings`).
223
+ A project fixture with no resolved consumer in the collected items, a requested
224
+ fixture that did not execute, or a fixture that simply returns its dependency is
225
+ a review candidate for the selected run. A repeated fixture name within one
226
+ `usefixtures` marker requests the same setup twice in the declaration. Pytest
227
+ sets it up once. The analyzer reports the redundant request and exits with code
228
+ 1 after an otherwise successful run. Existing pytest failure codes take priority.
229
+
230
+ Parameterized functions are compared once, using the union of their cases'
231
+ direct coverage. JSON stores individual outcomes and arcs in `tests[].cases`.
232
+ A failed or skipped case makes the function ineligible for overlap comparisons.
233
+ Fixture diagnostics describe the collected selection, including path, keyword
234
+ and marker filters. Dynamic requests count when observed. A fixture-only flag
235
+ can also originate from a fixture finalizer in teardown. The in-session options
236
+ `--deduplicate-source`, `--deduplicate-json` and `--deduplicate-html` select the
237
+ application path and output files. An unreachable top-level `pass` immediately
238
+ following `return` or `raise` in a test also sets exit code 1.
@@ -94,10 +94,13 @@ group does not validate the whole group. Pairwise mutant differences do not
94
94
  prove anything about the fault-detection union of a combined finding. No status
95
95
  authorizes automatic removal.
96
96
 
97
- `tests[].phase_file_arcs` separates setup/call/teardown evidence. By default,
98
- comparisons use all observed protocol activity. Use `--coverage-phase call` to
99
- compare test calls without fixture setup/teardown. Shared fixtures remain
100
- attributed only when executed; phases are not reconstructed for other tests.
97
+ `tests[].phase_file_arcs` separates setup/call/teardown evidence. Live comparisons default to the test call with fixture setup excluded,
98
+ including setup triggered by `request.getfixturevalue`. A direct call by the test
99
+ still counts when a fixture executed the same lines. A passing test with measured
100
+ fixture setup and zero direct arcs is flagged as `fixture_only`. Use `--source`
101
+ to define the application scope. Shared fixtures contribute evidence only when
102
+ they execute. Use `--coverage-phase call` for the full call or
103
+ `--coverage-phase all` for the whole protocol.
101
104
 
102
105
  ## Import pytest-cov and xdist results
103
106
 
@@ -185,3 +188,25 @@ CI covers Python 3.9–3.14, minimum/current dependency combinations, and a Wind
185
188
  The build checker stages an explicit set of release files, excluding unrelated local Cython experiments and untracked `setup.py` files. If such an experimental setup script is present in your working directory, use the checker for release validation; a direct `pip install .` can invoke that script. The committed project uses the pure-Python modules declared in `pyproject.toml`.
186
189
 
187
190
  Python 3.8 is no longer advertised: the original runtime type aliases already required 3.9, and the mutation sampler now explicitly uses Python 3.9's AST support.
191
+
192
+ After installation, run `pytest --deduplicate` to analyze the current pytest session.
193
+ For continuous use, add `--deduplicate` to pytest's `addopts`. This mode
194
+ uses the serial coverage collector and prints its report in the terminal.
195
+
196
+ Live runs include fixture diagnostics in text and JSON (`fixture_findings`).
197
+ A project fixture with no resolved consumer in the collected items, a requested
198
+ fixture that did not execute, or a fixture that simply returns its dependency is
199
+ a review candidate for the selected run. A repeated fixture name within one
200
+ `usefixtures` marker requests the same setup twice in the declaration. Pytest
201
+ sets it up once. The analyzer reports the redundant request and exits with code
202
+ 1 after an otherwise successful run. Existing pytest failure codes take priority.
203
+
204
+ Parameterized functions are compared once, using the union of their cases'
205
+ direct coverage. JSON stores individual outcomes and arcs in `tests[].cases`.
206
+ A failed or skipped case makes the function ineligible for overlap comparisons.
207
+ Fixture diagnostics describe the collected selection, including path, keyword
208
+ and marker filters. Dynamic requests count when observed. A fixture-only flag
209
+ can also originate from a fixture finalizer in teardown. The in-session options
210
+ `--deduplicate-source`, `--deduplicate-json` and `--deduplicate-html` select the
211
+ application path and output files. An unreachable top-level `pass` immediately
212
+ following `return` or `raise` in a test also sets exit code 1.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pytest_deduplicate"
7
- version = "0.2.1"
7
+ version = "0.3.0"
8
8
  description = "Reports observed test coverage overlap with optional stability and mutation checks"
9
9
  authors = [
10
10
  {name = "xor2003", email = "xor2003@gmx.com"},
@@ -41,8 +41,22 @@ tag-date = 0
41
41
  include-package-data = false
42
42
  py-modules = ["pytest_deduplicate", "pytest_deduplicate_checks", "pytest_deduplicate_review", "pytest_deduplicate_import", "pytest_deduplicate_index", "pytest_deduplicate_artifacts"]
43
43
 
44
+ [project.entry-points.pytest11]
45
+ pytest_deduplicate = "pytest_deduplicate"
46
+
44
47
  [project.scripts]
45
48
  pytest_deduplicate = "pytest_deduplicate:main"
46
49
 
47
50
  [project.optional-dependencies]
48
51
  dev = ["build>=1", "wheel", "hypothesis>=6.100", "pytest-cov>=5", "pytest-xdist>=3.6"]
52
+
53
+ [tool.mypy]
54
+ python_version = "3.12"
55
+ strict = true
56
+ explicit_package_bases = true
57
+
58
+ [tool.ruff]
59
+ target-version = "py39"
60
+
61
+ [tool.ruff.lint]
62
+ select = ["E4", "E7", "E9", "F", "I", "ANN001", "ANN002", "ANN003", "ANN201", "ANN202", "ANN204", "ANN205", "ANN206"]
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
2
- Name: pytest_deduplicate
3
- Version: 0.2.1
1
+ Metadata-Version: 2.1
2
+ Name: pytest-deduplicate
3
+ Version: 0.3.0
4
4
  Summary: Reports observed test coverage overlap with optional stability and mutation checks
5
5
  Author-email: xor2003 <xor2003@gmx.com>
6
6
  License: GPL
@@ -21,16 +21,8 @@ Classifier: Operating System :: OS Independent
21
21
  Classifier: Topic :: Software Development :: Quality Assurance
22
22
  Requires-Python: >=3.9
23
23
  Description-Content-Type: text/markdown
24
- License-File: LICENSE
25
- Requires-Dist: pytest>=7.4.4
26
- Requires-Dist: coverage>=7.6.1
27
24
  Provides-Extra: dev
28
- Requires-Dist: build>=1; extra == "dev"
29
- Requires-Dist: wheel; extra == "dev"
30
- Requires-Dist: hypothesis>=6.100; extra == "dev"
31
- Requires-Dist: pytest-cov>=5; extra == "dev"
32
- Requires-Dist: pytest-xdist>=3.6; extra == "dev"
33
- Dynamic: license-file
25
+ License-File: LICENSE
34
26
 
35
27
  # pytest_deduplicate
36
28
 
@@ -128,10 +120,13 @@ group does not validate the whole group. Pairwise mutant differences do not
128
120
  prove anything about the fault-detection union of a combined finding. No status
129
121
  authorizes automatic removal.
130
122
 
131
- `tests[].phase_file_arcs` separates setup/call/teardown evidence. By default,
132
- comparisons use all observed protocol activity. Use `--coverage-phase call` to
133
- compare test calls without fixture setup/teardown. Shared fixtures remain
134
- attributed only when executed; phases are not reconstructed for other tests.
123
+ `tests[].phase_file_arcs` separates setup/call/teardown evidence. Live comparisons default to the test call with fixture setup excluded,
124
+ including setup triggered by `request.getfixturevalue`. A direct call by the test
125
+ still counts when a fixture executed the same lines. A passing test with measured
126
+ fixture setup and zero direct arcs is flagged as `fixture_only`. Use `--source`
127
+ to define the application scope. Shared fixtures contribute evidence only when
128
+ they execute. Use `--coverage-phase call` for the full call or
129
+ `--coverage-phase all` for the whole protocol.
135
130
 
136
131
  ## Import pytest-cov and xdist results
137
132
 
@@ -219,3 +214,25 @@ CI covers Python 3.9–3.14, minimum/current dependency combinations, and a Wind
219
214
  The build checker stages an explicit set of release files, excluding unrelated local Cython experiments and untracked `setup.py` files. If such an experimental setup script is present in your working directory, use the checker for release validation; a direct `pip install .` can invoke that script. The committed project uses the pure-Python modules declared in `pyproject.toml`.
220
215
 
221
216
  Python 3.8 is no longer advertised: the original runtime type aliases already required 3.9, and the mutation sampler now explicitly uses Python 3.9's AST support.
217
+
218
+ After installation, run `pytest --deduplicate` to analyze the current pytest session.
219
+ For continuous use, add `--deduplicate` to pytest's `addopts`. This mode
220
+ uses the serial coverage collector and prints its report in the terminal.
221
+
222
+ Live runs include fixture diagnostics in text and JSON (`fixture_findings`).
223
+ A project fixture with no resolved consumer in the collected items, a requested
224
+ fixture that did not execute, or a fixture that simply returns its dependency is
225
+ a review candidate for the selected run. A repeated fixture name within one
226
+ `usefixtures` marker requests the same setup twice in the declaration. Pytest
227
+ sets it up once. The analyzer reports the redundant request and exits with code
228
+ 1 after an otherwise successful run. Existing pytest failure codes take priority.
229
+
230
+ Parameterized functions are compared once, using the union of their cases'
231
+ direct coverage. JSON stores individual outcomes and arcs in `tests[].cases`.
232
+ A failed or skipped case makes the function ineligible for overlap comparisons.
233
+ Fixture diagnostics describe the collected selection, including path, keyword
234
+ and marker filters. Dynamic requests count when observed. A fixture-only flag
235
+ can also originate from a fixture finalizer in teardown. The in-session options
236
+ `--deduplicate-source`, `--deduplicate-json` and `--deduplicate-html` select the
237
+ application path and output files. An unreachable top-level `pass` immediately
238
+ following `return` or `raise` in a test also sets exit code 1.
@@ -12,4 +12,10 @@ pytest_deduplicate.egg-info/SOURCES.txt
12
12
  pytest_deduplicate.egg-info/dependency_links.txt
13
13
  pytest_deduplicate.egg-info/entry_points.txt
14
14
  pytest_deduplicate.egg-info/requires.txt
15
- pytest_deduplicate.egg-info/top_level.txt
15
+ pytest_deduplicate.egg-info/top_level.txt
16
+ tests/test_analyzer.py
17
+ tests/test_features.py
18
+ tests/test_import_and_reports.py
19
+ tests/test_properties.py
20
+ tests/test_simple.py
21
+ tests/test_sparse_import.py
@@ -1,2 +1,5 @@
1
1
  [console_scripts]
2
2
  pytest_deduplicate = pytest_deduplicate:main
3
+
4
+ [pytest11]
5
+ pytest_deduplicate = pytest_deduplicate