@@ -179,8 +179,10 @@ def test_find_coverage_files_with_existing_files(self):
179179 self .project_root / "coverage.xml" ,
180180 self .project_root / "subdirectory" / "test_coverage.xml" ,
181181 self .project_root / "other_file.txt" ,
182+ self .project_root / ".tox" / "another_file.abc" ,
182183 ]
183184 (self .project_root / "subdirectory" ).mkdir ()
185+ (self .project_root / ".tox" ).mkdir ()
184186 for file in coverage_files :
185187 file .touch ()
186188
@@ -208,8 +210,10 @@ def test_find_coverage_files_with_disabled_search(self):
208210 self .project_root / "subdirectory" / "another_file.abc" ,
209211 self .project_root / "subdirectory" / "test_coverage.xml" ,
210212 self .project_root / "other_file.txt" ,
213+ self .project_root / ".tox" / "another_file.abc" ,
211214 ]
212215 (self .project_root / "subdirectory" ).mkdir ()
216+ (self .project_root / ".tox" ).mkdir ()
213217 for file in coverage_files :
214218 file .touch ()
215219
@@ -237,8 +241,10 @@ def test_find_coverage_files_with_user_specified_files(self):
237241 self .project_root / "subdirectory" / "test_coverage.xml" ,
238242 self .project_root / "test_file.abc" ,
239243 self .project_root / "subdirectory" / "another_file.abc" ,
244+ self .project_root / ".tox" / "another_file.abc" ,
240245 ]
241246 (self .project_root / "subdirectory" ).mkdir ()
247+ (self .project_root / ".tox" ).mkdir ()
242248 for file in coverage_files :
243249 file .touch ()
244250
@@ -264,8 +270,10 @@ def test_find_coverage_files_with_user_specified_files_not_found(self):
264270 coverage_files = [
265271 self .project_root / "coverage.xml" ,
266272 self .project_root / "subdirectory" / "test_coverage.xml" ,
273+ self .project_root / ".tox" / "another_file.abc" ,
267274 ]
268275 (self .project_root / "subdirectory" ).mkdir ()
276+ (self .project_root / ".tox" ).mkdir ()
269277 for file in coverage_files :
270278 file .touch ()
271279
@@ -286,3 +294,36 @@ def test_find_coverage_files_with_user_specified_files_not_found(self):
286294 ]
287295 expected_paths = sorted ([file .get_filename () for file in expected ])
288296 self .assertEqual (result , expected_paths )
297+
298+ def test_find_coverage_files_with_user_specified_files_in_default_ignored_folder (self ):
299+ # Create some sample coverage files
300+ coverage_files = [
301+ self .project_root / "coverage.xml" ,
302+ self .project_root / "subdirectory" / "test_coverage.xml" ,
303+ self .project_root / "test_file.abc" ,
304+ self .project_root / "subdirectory" / "another_file.abc" ,
305+ self .project_root / ".tox" / "another_file.abc" ,
306+ ]
307+ (self .project_root / "subdirectory" ).mkdir ()
308+ (self .project_root / ".tox" ).mkdir ()
309+ for file in coverage_files :
310+ file .touch ()
311+
312+ self .coverage_file_finder .explicitly_listed_files = [
313+ self .project_root / ".tox" / "another_file.abc" ,
314+ ]
315+ result = sorted (
316+ [file .get_filename () for file in self .coverage_file_finder .find_files ()]
317+ )
318+
319+ expected = [
320+ UploadCollectionResultFile (Path (f"{ self .project_root } /coverage.xml" )),
321+ UploadCollectionResultFile (
322+ Path (f"{ self .project_root } /subdirectory/test_coverage.xml" )
323+ ),
324+ UploadCollectionResultFile (
325+ Path (f"{ self .project_root } /.tox/another_file.abc" )
326+ ),
327+ ]
328+ expected_paths = sorted ([file .get_filename () for file in expected ])
329+ self .assertEqual (result , expected_paths )
0 commit comments