Skip to content

Commit

Permalink
Fixed test to validate correct behavior of dry-run with inclusion and…
Browse files Browse the repository at this point in the history
… exclusion flags

- Verified that excluded items are not listed during non-dry-run extraction.
  • Loading branch information
alighazi288 committed Dec 24, 2024
1 parent 2068b9f commit 471b175
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/borg/testsuite/archiver/extract_cmd_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,11 +730,10 @@ def test_dry_run_extraction_flags(archivers, request):

output = cmd(archiver, "extract", "--dry-run", "--list", "test", "-e", "input/file3.txt")

expected_output = ["- input/file1.txt", "- input/file2.txt"]
expected_output = ["+ input/file1.txt", "+ input/file2.txt", "- input/file3.txt"]
output_lines = output.splitlines()
for expected in expected_output:
assert expected in output_lines, f"Expected line not found: {expected}"
print(output)

assert not os.listdir("output"), "Output directory should be empty after dry-run"
print("Dry-run extraction with flags passed successfully!")

0 comments on commit 471b175

Please sign in to comment.