mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-22 14:11:27 +00:00
Add test for prune_split when no archives exist
This commit is contained in:
parent
9b6adc1cd6
commit
5b050bd01c
1 changed files with 13 additions and 0 deletions
|
@ -439,6 +439,19 @@ def subset(lst, ids):
|
|||
assert kept_because[4][0] == "yearly"
|
||||
|
||||
|
||||
def test_prune_split_no_archives():
|
||||
def subset(lst, ids):
|
||||
return {i for i in lst if i.id in ids}
|
||||
|
||||
archives = []
|
||||
|
||||
kept_because = {}
|
||||
keep = prune_split(archives, "yearly", 3, kept_because)
|
||||
|
||||
assert keep == []
|
||||
assert kept_because == {}
|
||||
|
||||
|
||||
class IntervalTestCase(BaseTestCase):
|
||||
def test_interval(self):
|
||||
self.assert_equal(interval('1H'), 1)
|
||||
|
|
Loading…
Reference in a new issue