mirror of https://github.com/borgbackup/borg.git
Add test for prune_split when no archives exist
This commit is contained in:
parent
9b6adc1cd6
commit
5b050bd01c
|
@ -439,6 +439,19 @@ def test_prune_split_keep_oldest():
|
||||||
assert kept_because[4][0] == "yearly"
|
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):
|
class IntervalTestCase(BaseTestCase):
|
||||||
def test_interval(self):
|
def test_interval(self):
|
||||||
self.assert_equal(interval('1H'), 1)
|
self.assert_equal(interval('1H'), 1)
|
||||||
|
|
Loading…
Reference in New Issue