Add broken config file to test error handling

ConfigFileFinder should absolutely handle broken/invalid config files
by refusing to try to parse them. Here we catch the ParsingError,
log the exception, and then return normally. The RawConfigParser
instance is perfectly valid still and will behave as if nothing had
been read and we just need to indicate that we didn't find any files
worthy of reading.

Related to: https://github.com/PyCQA/pycodestyle/issues/506
This commit is contained in:
Ian Cordasco 2016-06-16 16:19:09 -05:00
parent 9a9bcdfb52
commit 3f434f7d1c
No known key found for this signature in database
GPG key ID: 656D3395E4A9791A
3 changed files with 26 additions and 1 deletions

View file

@ -0,0 +1,9 @@
[flake8]
exclude =
<<<<<<< 642f88cb1b6027e184d9a662b255f7fea4d9eacc
tests/fixtures/,
=======
tests/,
>>>>>>> HEAD
docs/
ignore = D203