]> arthur.barton.de Git - bup.git/blobdiff - t/test-prune-older
prune-older: keep most recent save in each period group
[bup.git] / t / test-prune-older
index 717e4ce8579aa307d30de44e12d040cc17fdbe62..c54865c95bd4ea7b80ca540981508ca170a4597f 100755 (executable)
@@ -101,17 +101,17 @@ def expected_retentions(utcs, utc_start, spec):
     utcs = list(dropwhile(lambda x: x >= period_start['all'], utcs))
 
     matches = takewhile(lambda x: x >= period_start['dailies'], utcs)
-    dailies = [min(day_utcs) for yday, day_utcs
+    dailies = [max(day_utcs) for yday, day_utcs
                in groupby(matches, lambda x: localtime(x).tm_yday)]
     utcs = list(dropwhile(lambda x: x >= period_start['dailies'], utcs))
 
     matches = takewhile(lambda x: x >= period_start['monthlies'], utcs)
-    monthlies = [min(month_utcs) for month, month_utcs
+    monthlies = [max(month_utcs) for month, month_utcs
                  in groupby(matches, lambda x: localtime(x).tm_mon)]
     utcs = dropwhile(lambda x: x >= period_start['monthlies'], utcs)
 
     matches = takewhile(lambda x: x >= period_start['yearlies'], utcs)
-    yearlies = [min(year_utcs) for year, year_utcs
+    yearlies = [max(year_utcs) for year, year_utcs
                 in groupby(matches, lambda x: localtime(x).tm_year)]
 
     return chain(all, dailies, monthlies, yearlies)