Skip to content

Commit 36e9cd4

Browse files
tests: test_list_chunk_counts, save space on TMPDIR
1 parent 6210ae8 commit 36e9cd4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/borg/testsuite/archiver/list_cmd_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@ def test_list_chunk_counts(archivers, request):
3535
archiver = request.getfixturevalue(archivers)
3636
create_regular_file(archiver.input_path, "empty_file", size=0)
3737
create_regular_file(archiver.input_path, "two_chunks")
38-
with open(os.path.join(archiver.input_path, "two_chunks"), "wb") as fd:
38+
filename = os.path.join(archiver.input_path, "two_chunks")
39+
with open(filename, "wb") as fd:
3940
fd.write(b"abba" * 2000000)
4041
fd.write(b"baab" * 2000000)
4142
cmd(archiver, "repo-create", RK_ENCRYPTION)
4243
cmd(archiver, "create", "test", "input")
44+
os.unlink(filename) # save space on TMPDIR
4345
output = cmd(archiver, "list", "test", "--format", "{num_chunks} {path}{NL}")
4446
assert "0 input/empty_file" in output
4547
assert "2 input/two_chunks" in output

0 commit comments

Comments
 (0)