summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2016-02-28 18:16:52 +0100
committerhut <hut@lepus.uberspace.de>2016-02-28 18:16:58 +0100
commit55f9030f784a823a6bce7f498fb6a18e2bd9672b (patch)
tree2edbb71ec5ff4dfddd1b3a6ce3c6b1033abb8f2b /tests
parentc216901aef4380d9f0d06d4c5545c2983fc244ef (diff)
downloadranger-55f9030f784a823a6bce7f498fb6a18e2bd9672b.tar.gz
container.history: fixed rebase() unit test
Diffstat (limited to 'tests')
-rw-r--r--tests/ranger/container/test_container.py7
1 files changed, 4 insertions, 3 deletions
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")
20'>508bd3ad ^
1d5d645b ^
7df0ea4e ^

1d5d645b ^
708eae31 ^

f1b3d7b9 ^
708eae31 ^
414d9413 ^
708eae31 ^


414d9413 ^
708eae31 ^
414d9413 ^
f1b3d7b9 ^
708eae31 ^


f1b3d7b9 ^
708eae31 ^

96b2216b ^
414d9413 ^
96b2216b ^
414d9413 ^
96b2216b ^
414d9413 ^
96b2216b ^


414d9413 ^
96b2216b ^
708eae31 ^

96b2216b ^


414d9413 ^
96b2216b ^

fd7198b2 ^
96b2216b ^


708eae31 ^
9527eda9 ^
96b2216b ^
9527eda9 ^
708eae31 ^
6602c82f ^
9527eda9 ^
630433cd ^
9527eda9 ^
a1305217 ^
6602c82f ^

708eae31 ^
f1b3d7b9 ^


a413105a ^
630433cd ^
f1b3d7b9 ^
a413105a ^
a413105a ^
f1b3d7b9 ^
9527eda9 ^
f1b3d7b9 ^

4a99a6e0 ^
f1b3d7b9 ^

a413105a ^
f1b3d7b9 ^



6362c51d ^



9ad81331 ^
6362c51d ^
c442a5ad ^

f1b3d7b9 ^
708eae31 ^

9527eda9 ^
96b2216b ^
fd7198b2 ^
96b2216b ^
fd7198b2 ^
96b2216b ^



414d9413 ^
96b2216b ^



630433cd ^
96b2216b ^

414d9413 ^
4a99a6e0 ^

630433cd ^

fd7198b2 ^
630433cd ^

9527eda9 ^

665a4d70 ^
9527eda9 ^

630433cd ^
96b2216b ^


1f4d0aaf ^
fbc21293 ^
44fdc79f ^






6f6d458f ^




c88b9e31 ^

e5998f74 ^

1f4d0aaf ^
e0a0484c ^
e5998f74 ^
c442a5ad ^
e0a0484c ^
7a22a219 ^

e0a0484c ^
7a22a219 ^
e0a0484c ^

708eae31 ^



96b2216b ^



414d9413 ^


1a33d221 ^
708eae31 ^
cd23c8b6 ^
414d9413 ^


2097401c ^
708eae31 ^


708eae31 ^
087a998e ^
a066ad7e ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193