@@ -108,21 +108,39 @@ def test_repo_git_obtain_full(
108108
109109@pytest .mark .parametrize (
110110 # Postpone evaluation of options so fixture variables can interpolate
111- "constructor,lazy_constructor_options" ,
111+ "constructor,lazy_constructor_options,has_untracked_files " ,
112112 [
113113 [
114114 GitProject ,
115115 lambda git_remote_repo , tmp_path , ** kwargs : {
116116 "url" : f"file://{ git_remote_repo } " ,
117117 "dir" : tmp_path / "myrepo" ,
118118 },
119+ False
120+ ],
121+ [
122+ GitProject ,
123+ lambda git_remote_repo , tmp_path , ** kwargs : {
124+ "url" : f"file://{ git_remote_repo } " ,
125+ "dir" : tmp_path / "myrepo" ,
126+ },
127+ True
119128 ],
120129 [
121130 create_project_from_pip_url ,
122131 lambda git_remote_repo , tmp_path , ** kwargs : {
123132 "pip_url" : f"git+file://{ git_remote_repo } " ,
124133 "dir" : tmp_path / "myrepo" ,
125134 },
135+ False
136+ ],
137+ [
138+ create_project_from_pip_url ,
139+ lambda git_remote_repo , tmp_path , ** kwargs : {
140+ "pip_url" : f"git+file://{ git_remote_repo } " ,
141+ "dir" : tmp_path / "myrepo" ,
142+ },
143+ True
126144 ],
127145 ],
128146)
@@ -132,9 +150,16 @@ def test_repo_update_handle_cases(
132150 mocker : MockerFixture ,
133151 constructor : ProjectTestFactory ,
134152 lazy_constructor_options : ProjectTestFactoryLazyKwargs ,
153+ has_untracked_files : bool ,
135154):
136155 git_repo : GitProject = constructor (** lazy_constructor_options (** locals ()))
137156 git_repo .obtain () # clone initial repo
157+
158+ if has_untracked_files :
159+ some_file = git_repo .dir .joinpath ("some_file" )
160+ with open (some_file , "w" ) as untracked_file :
161+ untracked_file .write ("some content" )
162+
138163 mocka = mocker .spy (git_repo , "run" )
139164 git_repo .update_repo ()
140165
0 commit comments