From 55f9030f784a823a6bce7f498fb6a18e2bd9672b Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 28 Feb 2016 18:16:52 +0100 Subject: container.history: fixed rebase() unit test --- tests/ranger/container/test_container.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/ranger/container/test_container.py b/tests/ranger/container/test_container.py index fafb30c5..a24c3f8d 100644 --- a/tests/ranger/container/test_container.py +++ b/tests/ranger/container/test_container.py @@ -74,14 +74,15 @@ def testhistorybasic(): otherh = history.History(maxlen=h) assert(list(h) == list(otherh)) - # Rebase allow to merge entries with another history + # Rebase replaces the past of the history with that of another otherh = history.History(maxlen=h) + old_current_item = h.current() for entry in OTHER_TEST_ENTRIES: otherh.add(entry) assert list(otherh)[-3:] == ["42", "43", "44"] h.rebase(otherh) - assert h.current() == "44" - assert list(h)[-3:] == ['42', '43', '44'] + assert h.current() == old_current_item + assert list(h)[-3:] == ['43', '44', old_current_item] # modify, modifies the top of the stack h.modify("23") -- cgit 1.4.1-2-gfad0