mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-31 02:36:52 +00:00
update test for behavior configuring lfs careveout
This commit is contained in:
parent
e36771b57a
commit
2249b3a1de
1 changed files with 10 additions and 0 deletions
|
|
@ -96,6 +96,16 @@ def test_allows_gitlfs(temp_git_dir): # pragma: no cover
|
|||
# Should succeed
|
||||
assert main(('--maxkb', '9', 'f.py')) == 0
|
||||
|
||||
@xfailif_no_gitlfs
|
||||
def test_disallows_gitlfs_when_specified(temp_git_dir): # pragma: no cover
|
||||
with temp_git_dir.as_cwd():
|
||||
cmd_output('git', 'lfs', 'install', '--local')
|
||||
temp_git_dir.join('f.py').write('a' * 10000)
|
||||
cmd_output('git', 'lfs', 'track', 'f.py')
|
||||
cmd_output('git', 'add', '--', '.')
|
||||
# Should reject file
|
||||
assert main(('--maxkb', '9', '--allow-in-lfs', 'false', 'f.py')) == 1
|
||||
|
||||
|
||||
@xfailif_no_gitlfs
|
||||
def test_moves_with_gitlfs(temp_git_dir): # pragma: no cover
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue