mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-04 19:26:52 +00:00
Add support for sections in requirements-fixer
This commit is contained in:
parent
429455474b
commit
cc5d4504d0
2 changed files with 58 additions and 28 deletions
|
|
@ -107,6 +107,25 @@ from pre_commit_hooks.requirements_txt_fixer import Requirement
|
|||
PASS,
|
||||
b'a=2.0.0 \\\n --hash=sha256:abcd\nb==1.0.0\n',
|
||||
),
|
||||
(
|
||||
(
|
||||
b'-c external.txt\n'
|
||||
b'\n'
|
||||
b'Peach\n'
|
||||
b'apple\n'
|
||||
b'banana\n'
|
||||
b'pear\n'
|
||||
),
|
||||
FAIL,
|
||||
(
|
||||
b'-c external.txt\n'
|
||||
b'\n'
|
||||
b'apple\n'
|
||||
b'banana\n'
|
||||
b'Peach\n'
|
||||
b'pear\n'
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
def test_integration(input_s, expected_retval, output, tmpdir):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue