File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -205,17 +205,20 @@ def test_remote_clone_recovers_from_corrupt_mirror(
205205 assert Path (dst2 , "README.md" ).read_text () == "hello world"
206206
207207
208- @pytest .fixture (scope = "session " , autouse = True )
208+ @pytest .fixture (scope = "module " , autouse = True )
209209def allow_file_submodules () -> None :
210210 """Allow the fixture repos below to be used as submodules.
211211
212212 Since Git 2.38.1 the file protocol is blocked for submodules by default
213213 (see GHSA-3wp6-j8xr-qw85), so local submodules require this setting. Set
214214 it via the environment so it also applies to Copier's own subprocesses.
215215 """
216- local .env ["GIT_CONFIG_COUNT" ] = "1"
217- local .env ["GIT_CONFIG_KEY_0" ] = "protocol.file.allow"
218- local .env ["GIT_CONFIG_VALUE_0" ] = "always"
216+ with local .env (
217+ GIT_CONFIG_COUNT = "1" ,
218+ GIT_CONFIG_KEY_0 = "protocol.file.allow" ,
219+ GIT_CONFIG_VALUE_0 = "always" ,
220+ ):
221+ yield
219222
220223
221224def test_remote_clone_submodule_with_moved_url (
You can’t perform that action at this time.
0 commit comments