diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2015-01-16 21:25:33 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-01-16 21:25:33 -0500 |
commit | a17ce9e93cb61915880a040769e9e40447a6a7d8 (patch) | |
tree | 27f5439d09af65315162beb27d0e475e90b22009 /tests | |
parent | c77fdffce302d32cfb4308e13387ebf1da25f6f3 (diff) | |
download | python-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.py | 10 |
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: |