mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add test to increase coverage
This commit is contained in:
parent
e77f4469b5
commit
253af856bf
1 changed files with 11 additions and 0 deletions
|
|
@ -284,3 +284,14 @@ def test_python_hook_weird_setup_cfg(tmp_path):
|
||||||
|
|
||||||
ret = run_language(tmp_path, python, 'socks', [os.devnull])
|
ret = run_language(tmp_path, python, 'socks', [os.devnull])
|
||||||
assert ret == (0, f'[{os.devnull!r}]\nhello hello\n'.encode())
|
assert ret == (0, f'[{os.devnull!r}]\nhello hello\n'.encode())
|
||||||
|
|
||||||
|
|
||||||
|
def test_simple_python_hook_additional_dependencies(tmp_path):
|
||||||
|
_make_hello_hello(tmp_path)
|
||||||
|
|
||||||
|
requirements_txt = tmp_path.joinpath('requirements.txt')
|
||||||
|
requirements_txt.write_text('')
|
||||||
|
deps = ['-r', requirements_txt]
|
||||||
|
|
||||||
|
ret = run_language(tmp_path, python, 'socks', [os.devnull], deps=deps)
|
||||||
|
assert ret == (0, f'[{os.devnull!r}]\nhello hello\n'.encode())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue