mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-10 21:34:18 +00:00
Remove @entry decorator (and misc cleanup)
This commit is contained in:
parent
9bfa01da81
commit
2f1d2bbe5b
13 changed files with 25 additions and 88 deletions
|
|
@ -17,12 +17,12 @@ TESTS = (
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(('input', 'expected_retval', 'output'), TESTS)
|
||||
def test_integration(input, expected_retval, output, tmpdir):
|
||||
@pytest.mark.parametrize(('input_s', 'expected_retval', 'output'), TESTS)
|
||||
def test_integration(input_s, expected_retval, output, tmpdir):
|
||||
path = os.path.join(tmpdir.strpath, 'file.txt')
|
||||
|
||||
with open(path, 'wb') as file_obj:
|
||||
file_obj.write(input)
|
||||
file_obj.write(input_s)
|
||||
|
||||
assert fix_requirements_txt([path]) == expected_retval
|
||||
assert open(path, 'rb').read() == output
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue