summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xtest/all_benchmarks.py8
-rwxr-xr-xtest/all_tests.py6
-rw-r--r--test/bm_human_readable.py6
-rw-r--r--test/bm_loader.py6
l---------test/ranger1
-rw-r--r--test/tc_bookmarks.py6
-rw-r--r--test/tc_colorscheme.py6
-rw-r--r--test/tc_direction.py6
-rw-r--r--test/tc_directory.py5
-rw-r--r--test/tc_displayable.py6
-rw-r--r--test/tc_ext.py6
-rw-r--r--test/tc_history.py6
-rw-r--r--test/tc_human_readable.py6
-rw-r--r--test/tc_keyapi.py6
-rw-r--r--test/tc_loader.py6
-rw-r--r--test/tc_newkeys.py10
-rw-r--r--test/tc_signal.py6
-rw-r--r--test/tc_ui.py6
-rw-r--r--test/tc_utfwidth.py8
19 files changed, 108 insertions, 8 deletions
diff --git a/test/all_benchmarks.py b/test/all_benchmarks.py
index 20f11ad8..a3612701 100755
--- a/test/all_benchmarks.py
+++ b/test/all_benchmarks.py
@@ -19,9 +19,13 @@ Run all the benchmarks inside this directory.
 Usage: ./all_benchmarks.py [count] [regexp-filters...]
 """
 
-import os
-import re
+import os.path
 import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
+import re
 import time
 
 if __name__ == '__main__':
diff --git a/test/all_tests.py b/test/all_tests.py
index 7cfc855f..0c184df5 100755
--- a/test/all_tests.py
+++ b/test/all_tests.py
@@ -19,8 +19,12 @@ Run all the tests inside this directory as a test suite.
 Usage: ./all_tests.py [verbosity]
 """
 
-import os
+import os.path
 import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
 import unittest
 
 if __name__ == '__main__':
diff --git a/test/bm_human_readable.py b/test/bm_human_readable.py
index 83f2a057..ef400774 100644
--- a/test/bm_human_readable.py
+++ b/test/bm_human_readable.py
@@ -13,6 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os.path
+import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
 from ranger.ext.human_readable import *
 
 # The version before 2010/06/24:
diff --git a/test/bm_loader.py b/test/bm_loader.py
index 968640a5..552954a7 100644
--- a/test/bm_loader.py
+++ b/test/bm_loader.py
@@ -13,6 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os.path
+import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
 from ranger.core.loader import Loader
 from ranger.fsobject import Directory, File
 from ranger.ext.openstruct import OpenStruct
diff --git a/test/ranger b/test/ranger
deleted file mode 120000
index 5459458c..00000000
--- a/test/ranger
+++ /dev/null
@@ -1 +0,0 @@
-../ranger
\ No newline at end of file
diff --git a/test/tc_bookmarks.py b/test/tc_bookmarks.py
index 9b41f1c6..59435f06 100644
--- a/test/tc_bookmarks.py
+++ b/test/tc_bookmarks.py
@@ -13,6 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os.path
+import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
 from os.path import realpath, join, dirname
 import unittest
 import os
diff --git a/test/tc_colorscheme.py b/test/tc_colorscheme.py
index 8d6adee6..eefb1e4f 100644
--- a/test/tc_colorscheme.py
+++ b/test/tc_colorscheme.py
@@ -13,6 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os.path
+import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
 from unittest import TestCase, main
 import random
 import ranger.colorschemes
diff --git a/test/tc_direction.py b/test/tc_direction.py
index 5c1776cf..16c26dab 100644
--- a/test/tc_direction.py
+++ b/test/tc_direction.py
@@ -13,6 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os.path
+import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
 import unittest
 from ranger.ext.direction import Direction
 from ranger.ext.openstruct import OpenStruct
diff --git a/test/tc_directory.py b/test/tc_directory.py
index a702c4db..754253b3 100644
--- a/test/tc_directory.py
+++ b/test/tc_directory.py
@@ -13,7 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os.path
 import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
 from os.path import realpath, join, dirname
 
 from ranger import fsobject
diff --git a/test/tc_displayable.py b/test/tc_displayable.py
index 1c66a40e..72e0507d 100644
--- a/test/tc_displayable.py
+++ b/test/tc_displayable.py
@@ -13,6 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os.path
+import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
 import unittest
 import curses
 from random import randint
diff --git a/test/tc_ext.py b/test/tc_ext.py
index 919f35a2..495591a1 100644
--- a/test/tc_ext.py
+++ b/test/tc_ext.py
@@ -13,6 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os.path
+import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
 import unittest
 from collections import deque
 
diff --git a/test/tc_history.py b/test/tc_history.py
index 301ebedd..02a8bb9f 100644
--- a/test/tc_history.py
+++ b/test/tc_history.py
@@ -13,6 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os.path
+import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
 from ranger.container import History
 from unittest import TestCase, main
 import unittest
diff --git a/test/tc_human_readable.py b/test/tc_human_readable.py
index b931ba21..493e6d3a 100644
--- a/test/tc_human_readable.py
+++ b/test/tc_human_readable.py
@@ -13,6 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os.path
+import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
 import unittest
 from ranger.ext.human_readable import human_readable as hr
 
diff --git a/test/tc_keyapi.py b/test/tc_keyapi.py
index 48282a7d..79d89fa5 100644
--- a/test/tc_keyapi.py
+++ b/test/tc_keyapi.py
@@ -13,6 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os.path
+import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
 from unittest import TestCase, main
 
 class Test(TestCase):
diff --git a/test/tc_loader.py b/test/tc_loader.py
index 9f7f7322..5a2e5a68 100644
--- a/test/tc_loader.py
+++ b/test/tc_loader.py
@@ -13,6 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os.path
+import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
 import unittest
 import os
 from os.path import realpath, join, dirname
diff --git a/test/tc_newkeys.py b/test/tc_newkeys.py
index fd856f17..c9597201 100644
--- a/test/tc_newkeys.py
+++ b/test/tc_newkeys.py
@@ -12,7 +12,13 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+import os.path
+import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+sys.path[1:1] = ['..']
 
 from unittest import TestCase, main
 
@@ -22,8 +28,6 @@ from ranger.container.keymap import *
 from ranger.container.keybuffer import KeyBuffer
 from ranger.ext.keybinding_parser import parse_keybinding
 
-import sys
-
 def simulate_press(self, string):
 	for char in parse_keybinding(string):
 		self.add(char)
diff --git a/test/tc_signal.py b/test/tc_signal.py
index f31681f4..3b1bac40 100644
--- a/test/tc_signal.py
+++ b/test/tc_signal.py
@@ -13,6 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os.path
+import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
 import unittest
 import gc
 from ranger.ext.signal_dispatcher import *
diff --git a/test/tc_ui.py b/test/tc_ui.py
index dc8d669d..fa2bdcac 100644
--- a/test/tc_ui.py
+++ b/test/tc_ui.py
@@ -13,6 +13,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+import os.path
+import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+
 import unittest
 import curses
 
diff --git a/test/tc_utfwidth.py b/test/tc_utfwidth.py
index 2aa5fa6d..0288c17b 100644
--- a/test/tc_utfwidth.py
+++ b/test/tc_utfwidth.py
@@ -12,7 +12,13 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+import os.path
+import sys
+rangerpath = os.path.join(os.path.dirname(__file__), '..')
+if sys.path[1] != rangerpath:
+	sys.path[1:1] = [rangerpath]
+sys.path[1:1] = ['..']
 
 from unittest import TestCase, main
 from ranger.ext.utfwidth import *
mu/blame/html/031merge.cc.html?h=hlt&id=013d95266d563a3f531c13eba6d2a6bfe18f8808'>^
2c678a4e ^
805d58c6 ^


5fe060d5 ^
805d58c6 ^






5fe060d5 ^
805d58c6 ^


5fe060d5 ^

805d58c6 ^


204dae92 ^


201458e3 ^
204dae92 ^
201458e3 ^
204dae92 ^

805d58c6 ^
5fe060d5 ^
805d58c6 ^
5fe060d5 ^
805d58c6 ^







5fe060d5 ^
805d58c6 ^
5fe060d5 ^
805d58c6 ^
5fe060d5 ^

805d58c6 ^
5fe060d5 ^
805d58c6 ^





5fe060d5 ^
805d58c6 ^














5fe060d5 ^


805d58c6 ^







5fe060d5 ^
805d58c6 ^





204dae92 ^












201458e3 ^
204dae92 ^

201458e3 ^
204dae92 ^

5fe060d5 ^
204dae92 ^
2f02189d ^



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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294