File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -291,6 +291,15 @@ def test_project_build(
291291 project2 = Project .from_json (tmp_path / "project.json" )
292292 assert project2 .origin_dataset == project .outputs ["original" ]["dataset" ]
293293
294+ # Resetting with an additional file in the project root should raise an error
295+ (tmp_path / "pinnifred.txt" ).touch ()
296+ with pytest .raises (RuntimeError , match = r"pinnifred.txt" ):
297+ project .reset ()
298+
299+ # Files added in the "other" folder are moved in the project root after reset
300+ new_file_in_other = (tmp_path / "pinnifred.txt" ).replace (tmp_path / "other" )
301+ files_before_build .append (new_file_in_other )
302+
294303 # Resetting the project should put back all original files back
295304 project .reset ()
296305 assert sorted (str (file ) for file in tmp_path .rglob ("*" )) == sorted (
You can’t perform that action at this time.
0 commit comments