Beispiel #1
0
    def test_duplicates(self):
        l2r = Log2Rotate()

        state = [1, 1, 2, 2, 3, 3, 4, 4]
        self.assertRaises(Log2RotatePeriodError, l2r.backups_to_keep, state)
Beispiel #2
0
 def test_two(self):
     self.assertEqual([0, 1, -1, 2, -2], Log2Rotate.fuzzy_range(2))
Beispiel #3
0
    def test_simple(self):
        l2r = Log2Rotate()

        state = [1, 2, 3, 4]
        self.assertEqual([1, 3, 4], l2r.backups_to_keep(state))
Beispiel #4
0
 def test_one(self):
     self.assertEqual([0, 1, -1], Log2Rotate.fuzzy_range(1))
Beispiel #5
0
 def test_zero(self):
     self.assertEqual([0], Log2Rotate.fuzzy_range(0))
Beispiel #6
0
	def test_two(self):
		self.assertEqual([0, 1, -1, 2, -2], Log2Rotate.fuzzy_range(2))
Beispiel #7
0
	def test_one(self):
		self.assertEqual([0, 1, -1], Log2Rotate.fuzzy_range(1))
Beispiel #8
0
	def test_zero(self):
		self.assertEqual([0], Log2Rotate.fuzzy_range(0))