Update our linecache test to correct it

This commit is contained in:
Ian Cordasco 2016-05-30 16:48:30 -05:00
parent 467672fc5c
commit 15043a4ab7

View file

@ -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