summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-01-16 21:25:33 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-01-16 21:25:33 -0500
commita17ce9e93cb61915880a040769e9e40447a6a7d8 (patch)
tree27f5439d09af65315162beb27d0e475e90b22009 /tests
parentc77fdffce302d32cfb4308e13387ebf1da25f6f3 (diff)
downloadpython-coveragepy-git-a17ce9e93cb61915880a040769e9e40447a6a7d8.tar.gz
Provide early error messages for bad regexes in config. #349
Diffstat (limited to 'tests')
-rw-r--r--tests/test_config.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py
index ee4db966..65586846 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -96,6 +96,16 @@ class ConfigTest(CoverageTest):
("[run]\ntimid = maybe?\n", r"maybe[?]"),
("timid = 1\n", r"timid = 1"),
("[run\n", r"\[run"),
+ ("[report]\nexclude_lines = foo(\n",
+ r"Invalid \[report\].exclude_lines value 'foo\(': "
+ r"unbalanced parenthesis"),
+ ("[report]\npartial_branches = foo[\n",
+ r"Invalid \[report\].partial_branches value 'foo\[': "
+ r"unexpected end of regular expression"),
+ ("[report]\npartial_branches_always = foo***\n",
+ r"Invalid \[report\].partial_branches_always value "
+ r"'foo\*\*\*': "
+ r"multiple repeat"),
]
for bad_config, msg in bad_configs_and_msgs: