pytest-deduplicate 0.2.0__tar.gz → 0.2.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.
- {pytest_deduplicate-0.2.0/pytest_deduplicate.egg-info → pytest_deduplicate-0.2.1}/PKG-INFO +1 -1
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pyproject.toml +1 -1
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1/pytest_deduplicate.egg-info}/PKG-INFO +1 -1
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pytest_deduplicate_import.py +13 -1
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/LICENSE +0 -0
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/README.md +0 -0
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pytest_deduplicate.egg-info/SOURCES.txt +0 -0
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pytest_deduplicate.egg-info/dependency_links.txt +0 -0
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pytest_deduplicate.egg-info/entry_points.txt +0 -0
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pytest_deduplicate.egg-info/requires.txt +0 -0
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pytest_deduplicate.egg-info/top_level.txt +0 -0
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pytest_deduplicate.py +0 -0
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pytest_deduplicate_artifacts.py +0 -0
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pytest_deduplicate_checks.py +0 -0
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pytest_deduplicate_index.py +0 -0
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pytest_deduplicate_review.py +0 -0
- {pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/setup.cfg +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pytest_deduplicate"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.1"
|
|
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"},
|
|
@@ -184,6 +184,18 @@ def import_coverage(plugin, coverage_file, manifest_file):
|
|
|
184
184
|
continue
|
|
185
185
|
excluded = set(manifest['excluded_test_lines'].get(str(path), []))
|
|
186
186
|
scoped_files.append((filename, str(path), excluded))
|
|
187
|
+
files_by_context = {}
|
|
188
|
+
for file_info in scoped_files:
|
|
189
|
+
filename, _, _ = file_info
|
|
190
|
+
# Line contexts omit arcs with no positive endpoint (for example, an
|
|
191
|
+
# empty code object). Keep those files eligible in every context.
|
|
192
|
+
if any(start <= 0 and end <= 0 for start, end in data.arcs(filename) or []):
|
|
193
|
+
file_contexts = contexts
|
|
194
|
+
else:
|
|
195
|
+
file_contexts = {context for values in data.contexts_by_lineno(filename).values()
|
|
196
|
+
for context in values}
|
|
197
|
+
for context in file_contexts:
|
|
198
|
+
files_by_context.setdefault(context, []).append(file_info)
|
|
187
199
|
for test in observations:
|
|
188
200
|
phases = test['phases']
|
|
189
201
|
if set(phases) != {'setup', 'call', 'teardown'}:
|
|
@@ -200,7 +212,7 @@ def import_coverage(plugin, coverage_file, manifest_file):
|
|
|
200
212
|
continue
|
|
201
213
|
data.set_query_context(context)
|
|
202
214
|
arcs_by_file = {}
|
|
203
|
-
for filename, path, excluded in
|
|
215
|
+
for filename, path, excluded in files_by_context.get(context, ()):
|
|
204
216
|
arcs = {arc for arc in data.arcs(filename) or [] if not any(abs(n) in excluded for n in arc)}
|
|
205
217
|
if arcs:
|
|
206
218
|
arcs_by_file[path] = arcs
|
|
File without changes
|
|
File without changes
|
{pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pytest_deduplicate.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pytest_deduplicate.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pytest_deduplicate.egg-info/requires.txt
RENAMED
|
File without changes
|
{pytest_deduplicate-0.2.0 → pytest_deduplicate-0.2.1}/pytest_deduplicate.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|