mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-08 14:04:16 +00:00
improve code coverage in a few places
This commit is contained in:
parent
5899e7d720
commit
737e0492d0
3 changed files with 9 additions and 17 deletions
|
|
@ -313,3 +313,10 @@ def test_stdin_get_value_crlf():
|
|||
stdin = io.TextIOWrapper(io.BytesIO(b'1\r\n2\r\n'), 'UTF-8')
|
||||
with mock.patch.object(sys, 'stdin', stdin):
|
||||
assert utils.stdin_get_value.__wrapped__() == '1\n2\n'
|
||||
|
||||
|
||||
def test_stdin_unknown_coding_token():
|
||||
"""Ensure we produce source even for unknown encodings."""
|
||||
stdin = io.TextIOWrapper(io.BytesIO(b'# coding: unknown\n'), 'UTF-8')
|
||||
with mock.patch.object(sys, 'stdin', stdin):
|
||||
assert utils.stdin_get_value.__wrapped__() == '# coding: unknown\n'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue