@@ -85,10 +85,9 @@ def has_gitlfs():
85
85
86
86
87
87
@xfailif_no_gitlfs
88
- def test_allows_gitlfs (temp_git_dir , monkeypatch ): # pragma: no cover
88
+ def test_allows_gitlfs (temp_git_dir ): # pragma: no cover
89
89
with temp_git_dir .as_cwd ():
90
- monkeypatch .setenv ('HOME' , str (temp_git_dir ))
91
- cmd_output ('git' , 'lfs' , 'install' )
90
+ cmd_output ('git' , 'lfs' , 'install' , '--local' )
92
91
temp_git_dir .join ('f.py' ).write ('a' * 10000 )
93
92
cmd_output ('git' , 'lfs' , 'track' , 'f.py' )
94
93
cmd_output ('git' , 'add' , '--' , '.' )
@@ -97,10 +96,9 @@ def test_allows_gitlfs(temp_git_dir, monkeypatch): # pragma: no cover
97
96
98
97
99
98
@xfailif_no_gitlfs
100
- def test_moves_with_gitlfs (temp_git_dir , monkeypatch ): # pragma: no cover
99
+ def test_moves_with_gitlfs (temp_git_dir ): # pragma: no cover
101
100
with temp_git_dir .as_cwd ():
102
- monkeypatch .setenv ('HOME' , str (temp_git_dir ))
103
- cmd_output ('git' , 'lfs' , 'install' )
101
+ cmd_output ('git' , 'lfs' , 'install' , '--local' )
104
102
cmd_output ('git' , 'lfs' , 'track' , 'a.bin' , 'b.bin' )
105
103
# First add the file we're going to move
106
104
temp_git_dir .join ('a.bin' ).write ('a' * 10000 )
@@ -112,22 +110,20 @@ def test_moves_with_gitlfs(temp_git_dir, monkeypatch): # pragma: no cover
112
110
113
111
114
112
@xfailif_no_gitlfs
115
- def test_enforce_allows_gitlfs (temp_git_dir , monkeypatch ): # pragma: no cover
113
+ def test_enforce_allows_gitlfs (temp_git_dir ): # pragma: no cover
116
114
with temp_git_dir .as_cwd ():
117
- monkeypatch .setenv ('HOME' , str (temp_git_dir ))
118
- cmd_output ('git' , 'lfs' , 'install' )
115
+ cmd_output ('git' , 'lfs' , 'install' , '--local' )
119
116
temp_git_dir .join ('f.py' ).write ('a' * 10000 )
120
117
cmd_output ('git' , 'lfs' , 'track' , 'f.py' )
121
118
cmd_output ('git' , 'add' , '--' , '.' )
122
119
# With --enforce-all large files on git lfs should succeed
123
120
assert main (('--enforce-all' , '--maxkb' , '9' , 'f.py' )) == 0
124
121
125
122
126
- @xfailif_no_gitlfs # pragma: no cover
127
- def test_enforce_allows_gitlfs_after_commit (temp_git_dir , monkeypatch ):
123
+ @xfailif_no_gitlfs
124
+ def test_enforce_allows_gitlfs_after_commit (temp_git_dir ): # pragma: no cover
128
125
with temp_git_dir .as_cwd ():
129
- monkeypatch .setenv ('HOME' , str (temp_git_dir ))
130
- cmd_output ('git' , 'lfs' , 'install' )
126
+ cmd_output ('git' , 'lfs' , 'install' , '--local' )
131
127
temp_git_dir .join ('f.py' ).write ('a' * 10000 )
132
128
cmd_output ('git' , 'lfs' , 'track' , 'f.py' )
133
129
cmd_output ('git' , 'add' , '--' , '.' )
0 commit comments