def test_add_doubble(self):
        """test adding a line twice in a row"""
        l = "testline"
        # test with disallowed double lines
        self.history.allow_double = False
        self.history.add(l)
        self.history.add(l)
        self.assertEqual(len(self.history.getlist()), 1)
        self.assertIn(l, self.history.getlist())

        # clean
        self.history.clear()

        # twice, but not in a row should still be allowed
        self.assertEqual(len(self.history.getlist()), 0)
        self.history.add(l)
        self.history.add("other line")
        self.history.add(l)
        self.assertEqual(len(self.history.getlist()), 3)

        # clear
        self.history.clear()

        # test with allowed double lines
        self.history.allow_double = True
        self.history.add(l)
        self.history.add(l)
        self.assertEqual(len(self.history.getlist()), 2)
        self.assertIn(l, self.history.getlist())
test adding a line twice in a row
tests/system/test_history.py