mirror of
https://github.com/kevinveenbirkenbach/duplicate-file-handler.git
synced 2024-11-14 18:11:03 +01:00
updated test script
This commit is contained in:
parent
62dc1e1250
commit
a505cfa8d3
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1 @@
|
||||
test_dir1
|
||||
test_dir2
|
||||
test_dir*
|
@ -23,11 +23,18 @@ def create_test_directory(base_dir, num_files=5, duplicate_files=2, depth=1):
|
||||
duplicate = os.path.join(dir, f"dup_{dup_num}_{file_names[i]}")
|
||||
shutil.copyfile(original, duplicate)
|
||||
|
||||
def copy_directory_contents(src, dst):
|
||||
if os.path.exists(dst):
|
||||
shutil.rmtree(dst)
|
||||
shutil.copytree(src, dst)
|
||||
|
||||
def create_file_structure(depth, num_files, duplicate_files):
|
||||
base_dirs = ['test_dir1', 'test_dir2']
|
||||
for base_dir in base_dirs:
|
||||
create_test_directory(base_dir, num_files, duplicate_files, depth)
|
||||
|
||||
copy_directory_contents('test_dir1', 'test_dir3')
|
||||
|
||||
print("Test file structure created.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
Reference in New Issue
Block a user