@@ -36,6 +36,26 @@ def test_create_svn_remote_repo(
3636 assert svn_remote_1 != svn_remote_2
3737
3838
39+ def test_gitconfig (
40+ gitconfig : pathlib .Path ,
41+ set_gitconfig : pathlib .Path ,
42+ vcs_email : str ,
43+ ) -> None :
44+ """Test gitconfig fixture."""
45+ output = run (["git" , "config" , "--get" , "user.email" ])
46+ used_config_file_output = run (
47+ [
48+ "git" ,
49+ "config" ,
50+ "--show-origin" ,
51+ "--get" ,
52+ "user.email" ,
53+ ],
54+ )
55+ assert str (gitconfig ) in used_config_file_output
56+ assert vcs_email in output , "Should use our fixture config and home directory"
57+
58+
3959def test_git_fixtures (
4060 pytester : pytest .Pytester ,
4161 monkeypatch : pytest .MonkeyPatch ,
@@ -150,23 +170,3 @@ def test_git_bare_repo_sync_and_commit(
150170 # Test
151171 result = pytester .runpytest (str (first_test_filename ))
152172 result .assert_outcomes (passed = 2 )
153-
154-
155- def test_gitconfig (
156- gitconfig : pathlib .Path ,
157- set_gitconfig : pathlib .Path ,
158- vcs_email : str ,
159- ) -> None :
160- """Test gitconfig fixture."""
161- output = run (["git" , "config" , "--get" , "user.email" ])
162- used_config_file_output = run (
163- [
164- "git" ,
165- "config" ,
166- "--show-origin" ,
167- "--get" ,
168- "user.email" ,
169- ],
170- )
171- assert str (gitconfig ) in used_config_file_output
172- assert vcs_email in output , "Should use our fixture config and home directory"
0 commit comments