update test for behavior configuring lfs careveout

This commit is contained in:
Adam Zethraeus 2022-06-10 00:11:18 -07:00 committed by GitHub
parent e36771b57a
commit 2249b3a1de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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