summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Cordasco <graffatcolmingov@gmail.com>2017-06-01 20:06:34 -0500
committerIan Cordasco <graffatcolmingov@gmail.com>2017-06-01 20:06:34 -0500
commitfeec0754bd2f9c1f3b64ac309481cdfe40162bb7 (patch)
tree05ec2cf48c111348ae8e1816e6e45094986d3b1d /tests
parent68c6577564f63ba6f5ce8df384b72c6018d887ce (diff)
downloadflake8-feec0754bd2f9c1f3b64ac309481cdfe40162bb7.tar.gz
Add debugging utility for FileChecker
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/test_file_checker.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/test_file_checker.py b/tests/unit/test_file_checker.py
index a2d33fc..28264d5 100644
--- a/tests/unit/test_file_checker.py
+++ b/tests/unit/test_file_checker.py
@@ -23,3 +23,12 @@ def test_run_ast_checks_handles_SyntaxErrors(FileProcessor):
'E999', 1, 3,
'SyntaxError: Failed to build ast',
)
+
+
+@mock.patch('flake8.checker.FileChecker._make_processor', return_value=None)
+def test_repr(*args):
+ """Verify we generate a correct repr."""
+ file_checker = checker.FileChecker(
+ 'example.py', checks={}, options=object(),
+ )
+ assert repr(file_checker) == 'FileChecker for example.py'