def test_save_load(self):
        """test saving and loading of the history"""
        elements = ["1", "2", "3", "4", "5"]
        filename = "history_test_s_l"
        hname = "SaveLoadTest"
        self.history.swap(hname)
        # add elements
        for e in elements:
            self.history.add(e)
        # ensure correctly added
        self.assertEqual(len(self.history.getlist()), len(elements))
        # save
        self.history.save(filename)
        # assert no changes due to save
        self.assertEqual(len(self.history.getlist()), len(elements))
        # load
        h = ShHistory.load(filename, self.stash)
        h.swap(hname)
        # log a few more debug values
        self.logger.debug("h._histories: " + repr(h._histories))
        self.logger.debug("h._current: " + repr(h._current))
        self.logger.debug("self.history._histories: " + repr(self.history._histories))
        self.logger.debug("self.history._current: " + repr(self.history._current))
        # assert unique
        self.assertIsNot(h, self.history)
        # ensure all elements were loaded
        self.assertEqual(len(self.history.getlist()), len(elements))
        # ensure correct order
        self.assertListEqual(self.history.getlist(), h.getlist())
test saving and loading of the history
tests/system/test_history.py