diff-cover 9.7.2__tar.gz → 10.0.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.
- {diff_cover-9.7.2 → diff_cover-10.0.0}/PKG-INFO +2 -1
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/config_parser.py +20 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/pyproject.toml +4 -4
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_config_parser.py +83 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/LICENSE +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/NOTICE +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/README.rst +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/__init__.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/command_runner.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/diff_cover_tool.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/diff_quality_tool.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/diff_reporter.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/git_diff.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/git_path.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/hook.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/hookspecs.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/report_generator.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/snippets.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/templates/console_coverage_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/templates/console_quality_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/templates/external_style.css +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/templates/github_coverage_annotations.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/templates/html_coverage_report.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/templates/html_quality_report.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/templates/markdown_coverage_report.md +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/templates/markdown_quality_report.md +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/templates/snippet_content.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/templates/snippet_content.md +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/templates/snippet_content.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/templates/snippet_style.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/util.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/violationsreporters/__init__.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/violationsreporters/base.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/violationsreporters/java_violations_reporter.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/violationsreporters/violations_reporter.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/__init__.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/add_console_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/add_html_report.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/add_json_report.json +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/add_markdown_report.md +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/changed_console_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/changed_html_report.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/coverage.xml +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/coverage1.xml +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/coverage2.xml +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/coverage_missing_lines.xml +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/cpp_functions_console_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/cpp_functions_coverage.lcov +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/delete_console_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/delete_html_report.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/dotnet_coverage.xml +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/empty.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/empty_pycodestyle_violations.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/expand_console_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/external_css_html_report.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/external_style.css +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_add.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_changed.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_code_dupe.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_cpp.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_cpp_functions.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_delete.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_dotnet.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_external_css.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_lua.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_moved.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_mult.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_python.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_subdir.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_typescript.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_typescript_branches.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_unicode.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_violations.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/git_diff_violations_two_files.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/hello.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/hi.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/html_report.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/html_report_empty.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/html_report_one_snippet.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/html_report_two_snippets.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/lcov.info +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/lua_console_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/luacoverage.xml +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/markdown_report_one_snippet.md +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/markdown_report_two_snippets.md +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/moved_console_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/moved_coverage.xml +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/moved_html_report.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/mult_inputs_console_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/mult_inputs_html_report.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pycodestyle_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pycodestyle_violations_report.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pycodestyle_violations_report.json +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pycodestyle_violations_report.md +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pycodestyle_violations_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pycodestyle_violations_report_external_css.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pyflakes_two_files.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pyflakes_violations_report.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pyflakes_violations_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pylint_dupe.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pylint_dupe_violations_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pylint_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pylint_violations_console_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pylint_violations_report.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pylint_violations_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/pylintrc +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/real_cpp_console_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/real_cpp_coverage.lcov +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/real_python_console_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/real_python_coverage.lcov +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/real_typescript_console_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/real_typescript_coverage.lcov +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/show_uncovered_lines_console.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet.css +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet_8859.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet_arabic_output.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet_default.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet_invalid_violations.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet_list.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet_list.md +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet_list2.md +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet_list3.md +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet_no_filename_ext.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet_src.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet_src2.cpp +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet_src3.cpp +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet_unicode.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet_unicode.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/snippet_unicode_html_output.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/subdir_coverage_console_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/subdir_coverage_html_report.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/test_src.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/typescript_branches_console_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/typescript_branches_coverage.lcov +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/unicode_console_report.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/unicode_coverage.xml +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/unicode_html_report.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/unicode_test_src.txt +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/violations_test_file.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/helpers.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/snippet_list_unicode.html +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_clover_violations_reporter/test.xml +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_clover_violations_reporter.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_diff_cover_main.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_diff_cover_tool.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_diff_quality_main.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_diff_reporter.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_git_diff.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_git_diff_file.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_git_path.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_integration.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_java_violations_reporter.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_report_generator.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_snippets.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_util.py +0 -0
- {diff_cover-9.7.2 → diff_cover-10.0.0}/tests/test_violations_reporter.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: diff_cover
|
|
3
|
-
Version:
|
|
3
|
+
Version: 10.0.0
|
|
4
4
|
Summary: Run coverage and linting reports on diffs
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Author: See Contributors
|
|
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
21
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
21
22
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
22
23
|
Classifier: Topic :: Software Development :: Testing
|
|
@@ -67,6 +67,20 @@ def _parse_config_file(file_name, tool):
|
|
|
67
67
|
raise ParserError(f"No config parser could handle {file_name}")
|
|
68
68
|
|
|
69
69
|
|
|
70
|
+
def _normalize_patterns(patterns):
|
|
71
|
+
"""
|
|
72
|
+
Normalize exclude/include patterns to always be a list.
|
|
73
|
+
|
|
74
|
+
:param patterns: Pattern(s) from config (None, str, or list)
|
|
75
|
+
:returns: Normalized list or None
|
|
76
|
+
"""
|
|
77
|
+
if patterns is None:
|
|
78
|
+
return None
|
|
79
|
+
if isinstance(patterns, str):
|
|
80
|
+
return [patterns]
|
|
81
|
+
return patterns
|
|
82
|
+
|
|
83
|
+
|
|
70
84
|
def get_config(parser, argv, defaults, tool):
|
|
71
85
|
cli_config = vars(parser.parse_args(argv))
|
|
72
86
|
if cli_config["config_file"]:
|
|
@@ -84,4 +98,10 @@ def get_config(parser, argv, defaults, tool):
|
|
|
84
98
|
# else just override the existing value
|
|
85
99
|
config[key] = value
|
|
86
100
|
|
|
101
|
+
# Normalize exclude and include patterns to always be lists
|
|
102
|
+
if "exclude" in config:
|
|
103
|
+
config["exclude"] = _normalize_patterns(config["exclude"])
|
|
104
|
+
if "include" in config:
|
|
105
|
+
config["include"] = _normalize_patterns(config["include"])
|
|
106
|
+
|
|
87
107
|
return config
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "diff_cover"
|
|
3
|
-
version = "
|
|
3
|
+
version = "10.0.0"
|
|
4
4
|
description = "Run coverage and linting reports on diffs"
|
|
5
5
|
authors = ["See Contributors"]
|
|
6
6
|
homepage = "https://github.com/Bachmann1234/diff-cover"
|
|
@@ -15,11 +15,11 @@ classifiers=[
|
|
|
15
15
|
"Operating System :: OS Independent",
|
|
16
16
|
"Programming Language :: Python",
|
|
17
17
|
"Programming Language :: Python :: 3",
|
|
18
|
-
"Programming Language :: Python :: 3.9",
|
|
19
18
|
"Programming Language :: Python :: 3.10",
|
|
20
19
|
"Programming Language :: Python :: 3.11",
|
|
21
20
|
"Programming Language :: Python :: 3.12",
|
|
22
21
|
"Programming Language :: Python :: 3.13",
|
|
22
|
+
"Programming Language :: Python :: 3.14",
|
|
23
23
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
24
24
|
"Topic :: Software Development :: Testing",
|
|
25
25
|
"Topic :: Software Development :: Quality Assurance",
|
|
@@ -48,7 +48,7 @@ chardet = ">=3.0.0"
|
|
|
48
48
|
tomli = {version = ">=1.2.1", optional = true}
|
|
49
49
|
|
|
50
50
|
[tool.poetry.group.dev.dependencies]
|
|
51
|
-
pytest-cov = "
|
|
51
|
+
pytest-cov = ">=6.1.1,<8.0.0"
|
|
52
52
|
pytest-datadir = "^1.5.0"
|
|
53
53
|
pytest-mock = "^3.14.0"
|
|
54
54
|
pytest-xdist = "^3.6.1"
|
|
@@ -61,7 +61,7 @@ pydocstyle = "^6.1.1"
|
|
|
61
61
|
black = "^25.1.0"
|
|
62
62
|
isort = "^6.0.1"
|
|
63
63
|
doc8 = "1.1.2"
|
|
64
|
-
ruff = ">=0.11.10,<0.
|
|
64
|
+
ruff = ">=0.11.10,<0.15.0"
|
|
65
65
|
|
|
66
66
|
[tool.poetry.extras]
|
|
67
67
|
toml = ["tomli"]
|
|
@@ -98,3 +98,86 @@ def test_get_config(
|
|
|
98
98
|
parser = mocker.Mock()
|
|
99
99
|
parser.parse_args().__dict__ = cli_config
|
|
100
100
|
assert get_config(parser, argv=[], defaults=defaults, tool=tool) == expected
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
@pytest.mark.parametrize(
|
|
104
|
+
"tool,content,expected_exclude",
|
|
105
|
+
[
|
|
106
|
+
(Tool.DIFF_COVER, '[tool.diff_cover]\nexclude="*.pyc"', ["*.pyc"]),
|
|
107
|
+
(Tool.DIFF_QUALITY, '[tool.diff_quality]\nexclude="*.pyc"', ["*.pyc"]),
|
|
108
|
+
],
|
|
109
|
+
)
|
|
110
|
+
def test_normalize_exclude_string(mocker, tmp_path, tool, content, expected_exclude):
|
|
111
|
+
"""String exclude from TOML should be normalized to list."""
|
|
112
|
+
toml_file = tmp_path / "foo.toml"
|
|
113
|
+
toml_file.write_text(content)
|
|
114
|
+
|
|
115
|
+
cli_config = {"config_file": str(toml_file), "exclude": None}
|
|
116
|
+
parser = mocker.Mock()
|
|
117
|
+
parser.parse_args().__dict__ = cli_config
|
|
118
|
+
|
|
119
|
+
result = get_config(parser, argv=[], defaults={}, tool=tool)
|
|
120
|
+
assert result["exclude"] == expected_exclude
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
@pytest.mark.parametrize(
|
|
124
|
+
"tool,content,expected_exclude",
|
|
125
|
+
[
|
|
126
|
+
(
|
|
127
|
+
Tool.DIFF_COVER,
|
|
128
|
+
'[tool.diff_cover]\nexclude=["*.pyc", "*.pyo"]',
|
|
129
|
+
["*.pyc", "*.pyo"],
|
|
130
|
+
),
|
|
131
|
+
(
|
|
132
|
+
Tool.DIFF_QUALITY,
|
|
133
|
+
'[tool.diff_quality]\nexclude=["*.pyc", "*.pyo"]',
|
|
134
|
+
["*.pyc", "*.pyo"],
|
|
135
|
+
),
|
|
136
|
+
],
|
|
137
|
+
)
|
|
138
|
+
def test_exclude_list_unchanged(mocker, tmp_path, tool, content, expected_exclude):
|
|
139
|
+
"""List exclude from TOML should remain as list."""
|
|
140
|
+
toml_file = tmp_path / "foo.toml"
|
|
141
|
+
toml_file.write_text(content)
|
|
142
|
+
|
|
143
|
+
cli_config = {"config_file": str(toml_file), "exclude": None}
|
|
144
|
+
parser = mocker.Mock()
|
|
145
|
+
parser.parse_args().__dict__ = cli_config
|
|
146
|
+
|
|
147
|
+
result = get_config(parser, argv=[], defaults={}, tool=tool)
|
|
148
|
+
assert result["exclude"] == expected_exclude
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
@pytest.mark.parametrize(
|
|
152
|
+
"tool,content,expected_include",
|
|
153
|
+
[
|
|
154
|
+
(Tool.DIFF_COVER, '[tool.diff_cover]\ninclude="src/**"', ["src/**"]),
|
|
155
|
+
(Tool.DIFF_QUALITY, '[tool.diff_quality]\ninclude="src/**"', ["src/**"]),
|
|
156
|
+
],
|
|
157
|
+
)
|
|
158
|
+
def test_normalize_include_string(mocker, tmp_path, tool, content, expected_include):
|
|
159
|
+
"""String include from TOML should be normalized to list."""
|
|
160
|
+
toml_file = tmp_path / "foo.toml"
|
|
161
|
+
toml_file.write_text(content)
|
|
162
|
+
|
|
163
|
+
cli_config = {"config_file": str(toml_file), "include": None}
|
|
164
|
+
parser = mocker.Mock()
|
|
165
|
+
parser.parse_args().__dict__ = cli_config
|
|
166
|
+
|
|
167
|
+
result = get_config(parser, argv=[], defaults={}, tool=tool)
|
|
168
|
+
assert result["include"] == expected_include
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
def test_get_config_normalizes_both_patterns(mocker, tmp_path):
|
|
172
|
+
"""get_config should normalize both exclude and include from TOML files."""
|
|
173
|
+
toml_file = tmp_path / "foo.toml"
|
|
174
|
+
toml_file.write_text('[tool.diff_cover]\nexclude="*.pyc"\ninclude="src/**"')
|
|
175
|
+
|
|
176
|
+
cli_config = {"config_file": str(toml_file), "exclude": None, "include": None}
|
|
177
|
+
parser = mocker.Mock()
|
|
178
|
+
parser.parse_args().__dict__ = cli_config
|
|
179
|
+
|
|
180
|
+
result = get_config(parser, argv=[], defaults={}, tool=Tool.DIFF_COVER)
|
|
181
|
+
|
|
182
|
+
assert result["exclude"] == ["*.pyc"]
|
|
183
|
+
assert result["include"] == ["src/**"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/violationsreporters/java_violations_reporter.py
RENAMED
|
File without changes
|
{diff_cover-9.7.2 → diff_cover-10.0.0}/diff_cover/violationsreporters/violations_reporter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{diff_cover-9.7.2 → diff_cover-10.0.0}/tests/fixtures/typescript_branches_console_report.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|