mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-04 11:16:53 +00:00
add new line post reading requirements file, change before from tuple to list, add test cases
This commit is contained in:
parent
277f875bc5
commit
da2ea3f7a7
2 changed files with 10 additions and 2 deletions
|
|
@ -15,6 +15,9 @@ from pre_commit_hooks.requirements_txt_fixer import Requirement
|
|||
(b'foo\n# comment at end\n', PASS, b'foo\n# comment at end\n'),
|
||||
(b'foo\nbar\n', FAIL, b'bar\nfoo\n'),
|
||||
(b'bar\nfoo\n', PASS, b'bar\nfoo\n'),
|
||||
(b'a\nc\nb\n', FAIL, b'a\nb\nc\n'),
|
||||
(b'a\nc\nb', FAIL, b'a\nb\nc\n'),
|
||||
(b'a\nb\nc', PASS, b'a\nb\nc'),
|
||||
(
|
||||
b'#comment1\nfoo\n#comment2\nbar\n',
|
||||
FAIL,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue