Skip to content

Commit 351d1d9

Browse files
committed
test: add tests of invalid exclude_also and partial_also settings
1 parent f9c1638 commit 351d1d9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_config.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,15 @@ def test_force_environment(self, force: bool) -> None:
194194
("[report]\nexclude_lines = foo(\n",
195195
r"Invalid \[report\].exclude_lines value 'foo\(': " +
196196
r"(unbalanced parenthesis|missing \))"),
197+
("[report]\nexclude_also = foo(\n",
198+
r"Invalid \[report\].exclude_also value 'foo\(': " +
199+
r"(unbalanced parenthesis|missing \))"),
197200
("[report]\npartial_branches = foo[\n",
198201
r"Invalid \[report\].partial_branches value 'foo\[': " +
199202
r"(unexpected end of regular expression|unterminated character set)"),
203+
("[report]\npartial_also = foo[\n",
204+
r"Invalid \[report\].partial_also value 'foo\[': " +
205+
r"(unexpected end of regular expression|unterminated character set)"),
200206
("[report]\npartial_branches_always = foo***\n",
201207
r"Invalid \[report\].partial_branches_always value " +
202208
r"'foo\*\*\*': " +
@@ -214,9 +220,15 @@ def test_parse_errors(self, bad_config: str, msg: str) -> None:
214220
('[tool.coverage.report]\nexclude_lines = ["foo("]\n',
215221
r"Invalid \[tool.coverage.report\].exclude_lines value 'foo\(': " +
216222
r"(unbalanced parenthesis|missing \))"),
223+
('[tool.coverage.report]\nexclude_also = ["foo("]\n',
224+
r"Invalid \[tool.coverage.report\].exclude_also value 'foo\(': " +
225+
r"(unbalanced parenthesis|missing \))"),
217226
('[tool.coverage.report]\npartial_branches = ["foo["]\n',
218227
r"Invalid \[tool.coverage.report\].partial_branches value 'foo\[': " +
219228
r"(unexpected end of regular expression|unterminated character set)"),
229+
('[tool.coverage.report]\npartial_also = ["foo["]\n',
230+
r"Invalid \[tool.coverage.report\].partial_also value 'foo\[': " +
231+
r"(unexpected end of regular expression|unterminated character set)"),
220232
('[tool.coverage.report]\npartial_branches_always = ["foo***"]\n',
221233
r"Invalid \[tool.coverage.report\].partial_branches_always value " +
222234
r"'foo\*\*\*': " +

0 commit comments

Comments
 (0)