def test_getlist_inversed_order(self):
        """test  to ensure that ShHistory.getlist() returns the list in inversed order"""
        # list should be empty
        self.assertEqual(len(self.history.getlist()), 0)
        # add elements
        for i in range(10):
            self.history.add(str(i))
        # get list
        l = self.history.getlist()
        self.assertEqual(len(l), 10)
        # ensure reverse order
        for e, i in zip(l, range(len(l) - 1, 0, -1)):
            self.assertEqual(int(e), i)
test  to ensure that ShHistory.getlist() returns the list in inversed order
tests/system/test_history.py