Forráskód Böngészése

save space in test_create_* tests

Thomas Waldmann 3 hete
szülő
commit
38f97d65df
1 módosított fájl, 13 hozzáadás és 0 törlés
  1. 13 0
      src/borg/testsuite/archiver/create_cmd_test.py

+ 13 - 0
src/borg/testsuite/archiver/create_cmd_test.py

@@ -959,6 +959,10 @@ def test_create_big_zeros_files(archivers, request):
             # Also verify the directory structure matches
             assert_dirs_equal(archiver.input_path, os.path.join(extract_path, "input"))
 
+    # Remove input files
+    for i in range(count):
+        os.unlink(os.path.join(archiver.input_path, f"zeros_{i}"))
+
 
 def test_create_big_random_files(archivers, request):
     """Test creating an archive from 10 files with 10MB random data each."""
@@ -991,6 +995,10 @@ def test_create_big_random_files(archivers, request):
             # Also verify the directory structure matches
             assert_dirs_equal(archiver.input_path, os.path.join(extract_path, "input"))
 
+    # Remove input files
+    for i in range(count):
+        os.unlink(os.path.join(archiver.input_path, f"random_{i}"))
+
 
 def test_create_with_compression_algorithms(archivers, request):
     """Test creating archives with different compression algorithms."""
@@ -1052,3 +1060,8 @@ def test_create_with_compression_algorithms(archivers, request):
 
                 # Also verify the directory structure matches
                 assert_dirs_equal(archiver.input_path, os.path.join(extract_path, "input"))
+
+    # Remove input files
+    for i in range(count):
+        os.unlink(os.path.join(archiver.input_path, f"zeros_{i}"))
+        os.unlink(os.path.join(archiver.input_path, f"random_{i}"))