diff options
| author | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-05-30 16:48:30 -0500 |
|---|---|---|
| committer | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-05-30 16:48:30 -0500 |
| commit | 15043a4ab7a7d3eab7f3906e40f744c40ba83d17 (patch) | |
| tree | 8f71737b841fed732458b6bef35b532769f192b0 /tests | |
| parent | 467672fc5c5d9133155629cf1fe7694cc9427b0b (diff) | |
| download | flake8-15043a4ab7a7d3eab7f3906e40f744c40ba83d17.tar.gz | |
Update our linecache test to correct it
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/test_style_guide.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/unit/test_style_guide.py b/tests/unit/test_style_guide.py index 2b14721..4aa3c54 100644 --- a/tests/unit/test_style_guide.py +++ b/tests/unit/test_style_guide.py @@ -135,7 +135,9 @@ def test_is_inline_ignored(error_code, physical_line, expected_result): listener_trie=None, formatter=None) error = style_guide.Error(error_code, 'filename.py', 1, 1, 'error text', - physical_line) + None) + # We want `None` to be passed as the physical line so we actually use our + # monkey-patched linecache.getline value. with mock.patch('linecache.getline', return_value=physical_line): assert guide.is_inline_ignored(error) is expected_result |
