Skip to content

Commit 498d836

Browse files
Merge pull request #8980 from ThomasWaldmann/save_space-test_create_big-master
save space in test_create_* tests
2 parents 6a83ea1 + 38f97d6 commit 498d836

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/borg/testsuite/archiver/create_cmd_test.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,10 @@ def test_create_big_zeros_files(archivers, request):
959959
# Also verify the directory structure matches
960960
assert_dirs_equal(archiver.input_path, os.path.join(extract_path, "input"))
961961

962+
# Remove input files
963+
for i in range(count):
964+
os.unlink(os.path.join(archiver.input_path, f"zeros_{i}"))
965+
962966

963967
def test_create_big_random_files(archivers, request):
964968
"""Test creating an archive from 10 files with 10MB random data each."""
@@ -991,6 +995,10 @@ def test_create_big_random_files(archivers, request):
991995
# Also verify the directory structure matches
992996
assert_dirs_equal(archiver.input_path, os.path.join(extract_path, "input"))
993997

998+
# Remove input files
999+
for i in range(count):
1000+
os.unlink(os.path.join(archiver.input_path, f"random_{i}"))
1001+
9941002

9951003
def test_create_with_compression_algorithms(archivers, request):
9961004
"""Test creating archives with different compression algorithms."""
@@ -1052,3 +1060,8 @@ def test_create_with_compression_algorithms(archivers, request):
10521060

10531061
# Also verify the directory structure matches
10541062
assert_dirs_equal(archiver.input_path, os.path.join(extract_path, "input"))
1063+
1064+
# Remove input files
1065+
for i in range(count):
1066+
os.unlink(os.path.join(archiver.input_path, f"zeros_{i}"))
1067+
os.unlink(os.path.join(archiver.input_path, f"random_{i}"))

0 commit comments

Comments
 (0)